@ -1,16 +1,3 @@
|
||||
# timemanage
|
||||
# 时间管理
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
一个基于Flutter框架的APP
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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('课程表界面'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:timemanage/screens/projects_screen.dart';
|
||||
import 'package:timemanage/screens/reports_screen.dart';
|
||||
import 'package:timemanage/screens/export_screen.dart';
|
||||
import 'package:timemanage/screens/settings_screen.dart';
|
||||
import 'package:timemanage/screens/about_screen.dart';
|
||||
import 'package:timemanage/screens/course_screen.dart';
|
||||
|
||||
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('主界面'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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('导入与导出界面'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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('项目界面'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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('统计报告界面'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
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('设置界面'),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue