RhythmBox/lib/router.dart

31 lines
864 B
Dart
Raw Normal View History

2024-08-26 05:29:17 +00:00
import 'package:go_router/go_router.dart';
import 'package:rhythm_box/screens/explore.dart';
2024-08-26 12:26:07 +00:00
import 'package:rhythm_box/screens/playlist/view.dart';
2024-08-26 05:29:17 +00:00
import 'package:rhythm_box/screens/settings.dart';
import 'package:rhythm_box/shells/nav_shell.dart';
final router = GoRouter(routes: [
ShellRoute(
builder: (context, state, child) => NavShell(child: child),
routes: [
GoRoute(
path: "/",
name: "explore",
builder: (context, state) => const ExploreScreen(),
),
2024-08-27 06:35:16 +00:00
GoRoute(
path: "/playlist/:id",
name: "playlistView",
builder: (context, state) => PlaylistViewScreen(
playlistId: state.pathParameters['id']!,
),
),
2024-08-26 05:29:17 +00:00
GoRoute(
path: "/settings",
name: "settings",
builder: (context, state) => const SettingsScreen(),
),
],
),
]);