feat:增加统计图表模块
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flisp_app/layout/app_drawer.dart';
|
||||
import 'package:flisp_app/pages/calendar_page.dart';
|
||||
import 'package:flisp_app/pages/flisp_page.dart';
|
||||
import 'package:flisp_app/pages/stats_page.dart';
|
||||
import 'package:flisp_app/pages/todo_page.dart';
|
||||
import 'package:flisp_app/provider/app_provider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -25,6 +26,7 @@ class _MainScreenState extends State<MainScreen> {
|
||||
icon: Icon(Icons.calendar_month_rounded),
|
||||
label: '日程',
|
||||
),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.insert_chart), label: '统计'),
|
||||
];
|
||||
|
||||
@override
|
||||
@@ -89,7 +91,9 @@ class _MainScreenState extends State<MainScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildFloatingButton(BuildContext context, int index) {
|
||||
Widget? _buildFloatingButton(BuildContext context, int index) {
|
||||
if (index == 3) return null;
|
||||
|
||||
return FloatingActionButton(
|
||||
onPressed: () => _onPressFloatingButton(index),
|
||||
backgroundColor: Colors.transparent,
|
||||
@@ -115,6 +119,8 @@ class _MainScreenState extends State<MainScreen> {
|
||||
return TodoPage(key: _todoPageKey);
|
||||
case 2:
|
||||
return CalendarPage(key: _calendarPageKey);
|
||||
case 3:
|
||||
return StatsPage();
|
||||
default:
|
||||
return FlispPage(key: _flispPageKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user