This commit is contained in:
quantulr
2024-06-14 17:22:52 +08:00
parent 825b94b8c3
commit 62a7c7f29e
6 changed files with 160 additions and 57 deletions

View File

@ -1,17 +1,29 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:logistics_tools/logistics.dart';
import 'package:logistics_tools/order_list.dart';
void main() {
runApp(const MyApp());
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
MyApp({super.key});
final _router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const OrderList(),
),
GoRoute(path: '/logistics', builder: (context, state) => const Logistics())
],
);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
return MaterialApp.router(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
@ -33,7 +45,8 @@ class MyApp extends StatelessWidget {
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueAccent),
useMaterial3: true,
),
home: const OrderList(),
// home: const OrderList(),
routerConfig: _router,
);
}
}