2024-05-26 19:27:47 +02:00
|
|
|
import "package:example/src/configuration/configuration.dart";
|
|
|
|
import "package:example/src/ui/homepage.dart";
|
|
|
|
import "package:example/src/utils/go_router.dart";
|
2024-05-27 14:29:53 +02:00
|
|
|
import "package:flutter_shopping/flutter_shopping.dart";
|
2024-05-26 19:27:47 +02:00
|
|
|
import "package:go_router/go_router.dart";
|
|
|
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
|
|
|
|
|
|
|
const String homePage = "/";
|
|
|
|
|
|
|
|
final routerProvider = Provider<GoRouter>(
|
|
|
|
(ref) => GoRouter(
|
|
|
|
initialLocation: homePage,
|
|
|
|
routes: [
|
|
|
|
// Flutter Shopping Story Routes
|
|
|
|
...getShoppingStoryRoutes(
|
|
|
|
configuration: getFlutterShoppingConfiguration(),
|
|
|
|
),
|
|
|
|
|
|
|
|
// Home Route
|
|
|
|
GoRoute(
|
|
|
|
name: "home",
|
|
|
|
path: homePage,
|
|
|
|
pageBuilder: (context, state) => buildScreenWithFadeTransition(
|
|
|
|
context: context,
|
|
|
|
state: state,
|
|
|
|
child: const Homepage(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|