Skip to content

Commit

Permalink
feat: add search to right panel
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Jul 15, 2024
1 parent f990d77 commit c8620e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/lib/activity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ActivityPage extends ConsumerWidget {
return SingleChildScrollView(
child: DataTable(
columns: const [
DataColumn(label: Text("id"), numeric: true),
DataColumn(label: Text("#"), numeric: true),
DataColumn(label: Text("名称")),
DataColumn(label: Text("开始时间")),
DataColumn(label: Text("状态")),
Expand Down
9 changes: 8 additions & 1 deletion ui/lib/navdrawer.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:ui/activity.dart';
import 'package:ui/search.dart';
import 'package:ui/system_settings.dart';
import 'package:ui/weclome.dart';

Expand Down Expand Up @@ -34,8 +35,10 @@ class _NavDrawerState extends State<NavDrawer> {
if (value == 0) {
context.go(WelcomePage.route);
} else if (value == 1) {
context.go(ActivityPage.route);
context.go(SearchPage.route);
} else if (value == 2) {
context.go(ActivityPage.route);
} else if (value == 3) {
context.go(SystemSettingsPage.route);
}
},
Expand All @@ -46,6 +49,10 @@ class _NavDrawerState extends State<NavDrawer> {
icon: Icon(Icons.live_tv),
label: Text('电视剧'),
),
NavigationRailDestination(
icon: Icon(Icons.search),
label: Text('搜索'),
),
NavigationRailDestination(
icon: Icon(Icons.download),
label: Text('活动'),
Expand Down

0 comments on commit c8620e2

Please sign in to comment.