init
This commit is contained in:
60
lib/router.dart
Normal file
60
lib/router.dart
Normal 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();
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user