|
1 | 1 | import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter_web_plugins/flutter_web_plugins.dart'; |
| 3 | +import 'package:go_router/go_router.dart'; |
2 | 4 | import 'package:portfolio/pages/home_page.dart'; |
| 5 | +import 'package:portfolio/pages/projects/cofence_page.dart'; |
| 6 | +import 'package:portfolio/pages/projects/fencing_tableau_page.dart'; |
| 7 | +import 'package:portfolio/pages/projects/funcially_page.dart'; |
3 | 8 |
|
4 | 9 | void main() { |
5 | | - runApp(MaterialApp( |
6 | | - debugShowCheckedModeBanner: false, |
7 | | - themeMode: ThemeMode.dark, |
8 | | - theme: ThemeData.dark(useMaterial3: true), |
9 | | - home: const HomePage(), |
10 | | - )); |
| 10 | + usePathUrlStrategy(); |
| 11 | + runApp( |
| 12 | + MaterialApp.router( |
| 13 | + debugShowCheckedModeBanner: false, |
| 14 | + themeMode: ThemeMode.dark, |
| 15 | + theme: ThemeData.dark(useMaterial3: true), |
| 16 | + routerConfig: GoRouter( |
| 17 | + initialLocation: "/", |
| 18 | + routes: [ |
| 19 | + GoRoute( |
| 20 | + path: "/", |
| 21 | + builder: (context, state) => const HomePage(), |
| 22 | + routes: [ |
| 23 | + GoRoute( |
| 24 | + path: "fencing-tableau", |
| 25 | + builder: (context, state) => const FencingTableauPage(), |
| 26 | + ), |
| 27 | + GoRoute( |
| 28 | + path: "funcially", |
| 29 | + builder: (context, state) => const FunciallyPage(), |
| 30 | + ), |
| 31 | + GoRoute( |
| 32 | + path: "cofence", |
| 33 | + builder: (context, state) => const CofencePage(), |
| 34 | + ), |
| 35 | + ], |
| 36 | + ), |
| 37 | + ], |
| 38 | + ), |
| 39 | + ), |
| 40 | + ); |
11 | 41 | } |
0 commit comments