This commit is contained in:
quantulr
2023-02-06 23:45:56 +08:00
commit ac65c1dec0
147 changed files with 5605 additions and 0 deletions

60
lib/router.dart Normal file
View File

@ -0,0 +1,60 @@
// import 'package:fluent_ui/fluent_ui.dart';
// import 'package:fluentui_system_icons/fluentui_system_icons.dart'
// as fluentui_system_icons;
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class MyRouterConfig {
/// The route configuration.
static GoRouter router = GoRouter(
routes: <RouteBase>[
GoRoute(
path: '/',
builder: (BuildContext context, GoRouterState state) {
return Scaffold(
// drawer: Drawer(),
bottomNavigationBar: MediaQuery.of(context).size.width <= 640
? BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(Icons.add), label: "333333333"),
BottomNavigationBarItem(
icon: Icon(Icons.add), label: "333333333")
],
)
: null,
body: Row(
children: [
MediaQuery.of(context).size.width > 640
? NavigationRail(
destinations: [
NavigationRailDestination(
icon: Icon(Icons.add), label: Text("123")),
NavigationRailDestination(
icon: Icon(Icons.add), label: Text("123")),
],
extended: MediaQuery.of(context).size.width >= 1008,
backgroundColor: Colors.blueAccent,
// extended: true,
selectedIndex: 0,
)
: SizedBox(
width: 0,
),
Expanded(child: Container())
],
));
},
// routes: <RouteBase>[
// GoRoute(
// path: 'details',
// builder: (BuildContext context, GoRouterState state) {
// return const DetailsScreen();
// },
// ),
// ],
),
],
);
}