This commit is contained in:
cxc
2023-02-07 17:28:01 +08:00
parent ac65c1dec0
commit 06ff4a41f4
25 changed files with 537 additions and 184 deletions

View File

@ -1,19 +1,26 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:fluentui_system_icons/fluentui_system_icons.dart'
as fluentui_system_icons;
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:momo/provider/token.dart';
class HomePage extends StatefulWidget {
class HomePage extends ConsumerStatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
State<HomePage> createState() => _HomePageState();
ConsumerState<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
class _HomePageState extends ConsumerState<HomePage> {
int _selected = 0;
@override
Widget build(BuildContext context) {
Widget build(
BuildContext context,
) {
// String token = ref.watch(tokenProvider);
return MediaQuery.of(context).size.width > 640
? NavigationView(
appBar: NavigationAppBar(title: Text('momo')),
@ -46,6 +53,15 @@ class _HomePageState extends State<HomePage> {
header: PageHeader(
title: Text("213"),
),
content: Center(
child: FilledButton(
onPressed: () {
// ref.watch(tokenProvider.notifier).removeToken();
GoRouter.of(context).go("/login");
},
child: Text("退出"),
),
),
)),
PaneItem(
icon: const Icon(fluentui_system_icons