|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:timemanage/screen/dashboard_screen.dart';
|
|
|
|
|
import 'package:timemanage/screens/dashboard_screen.dart';
|
|
|
|
|
|
|
|
|
|
void main() => runApp(const MyApp());
|
|
|
|
|
|
|
|
|
|
@ -26,3 +26,178 @@ class MyApp extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class DashBoardScreen extends StatelessWidget {
|
|
|
|
|
const DashBoardScreen({super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
backgroundColor: Colors.blueAccent, // 背景色
|
|
|
|
|
// 最前面的菜单按钮
|
|
|
|
|
leading: MenuBar(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SubmenuButton(
|
|
|
|
|
menuChildren: <Widget>[
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const CourseScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('课程表'),
|
|
|
|
|
),
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const ProjectsScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('项目'),
|
|
|
|
|
),
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const ReportsScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('统计报告'),
|
|
|
|
|
),
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const ExportScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('导入和导出'),
|
|
|
|
|
),
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const SettingsScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('设置'),
|
|
|
|
|
),
|
|
|
|
|
MenuItemButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => const AboutScreen()),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: const Text('关于'),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child: const Icon(Icons.menu),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// 标题
|
|
|
|
|
title: const Text('时间管理'),
|
|
|
|
|
actions: [
|
|
|
|
|
// 搜索按钮
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: const Icon(Icons.search),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
// 筛选按钮
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: const Icon(Icons.filter_alt),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('主界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class CourseScreen extends StatelessWidget {
|
|
|
|
|
const CourseScreen({super.key});
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text('课程表'),
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('课程表界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ProjectsScreen extends StatelessWidget {
|
|
|
|
|
const ProjectsScreen({super.key});
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text('项目'),
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('项目界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ReportsScreen extends StatelessWidget {
|
|
|
|
|
const ReportsScreen({super.key});
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text('统计报告'),
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('统计报告界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ExportScreen extends StatelessWidget {
|
|
|
|
|
const ExportScreen({super.key});
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text('导入与导出'),
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('导入与导出界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SettingsScreen extends StatelessWidget {
|
|
|
|
|
const SettingsScreen({super.key});
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: const Text('设置'),
|
|
|
|
|
),
|
|
|
|
|
body: const Center(
|
|
|
|
|
child: Text('设置界面'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|