第一次提交
This commit is contained in:
34
lib/router.dart
Normal file
34
lib/router.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import './models/func_animation_route.dart';
|
||||
import './routes/root.dart';
|
||||
import './routes/settings.dart';
|
||||
import './routes/settings/theme.dart';
|
||||
import './routes/about.dart';
|
||||
|
||||
final router = GoRouter(
|
||||
initialLocation: '/',
|
||||
routes: [
|
||||
ShellRoute(
|
||||
builder: (context, state, child) {
|
||||
return child;
|
||||
},
|
||||
routes: [
|
||||
GoRoute(path: '/', builder: (context, state) => const RootRoute()),
|
||||
animationRoute(
|
||||
path: '/settings',
|
||||
child: const SettingsPage(),
|
||||
),
|
||||
animationRoute(
|
||||
path: '/settings/theme',
|
||||
child: const SettingsThemePage(),
|
||||
),
|
||||
animationRoute(
|
||||
path: '/about',
|
||||
child: const AboutPage(),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
Reference in New Issue
Block a user