Compare commits

...

2 Commits

Author SHA1 Message Date
weijungang 0f19f54a3e 1
2 years ago
weijungang 17d007a3c2 课表修改1
2 years ago

@ -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('设置界面'),
),
);
}
}

@ -9,7 +9,7 @@ class CourseScreen extends StatelessWidget {
title: const Text('课程表'),
),
body: const Center(
child: Text('课程界面'),
child: Text('课程课程'),
),
);
}

Loading…
Cancel
Save