mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
reorg ui into app
This commit is contained in:
40
lib/app/router.dart
Normal file
40
lib/app/router.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import 'screens/album_screen.dart';
|
||||
import 'screens/artist_screen.dart';
|
||||
import 'screens/library_screen.dart';
|
||||
import 'screens/now_playing_screen.dart';
|
||||
import 'screens/root_shell_screen.dart';
|
||||
import 'screens/settings_screen.dart';
|
||||
|
||||
final router = GoRouter(
|
||||
routes: [
|
||||
ShellRoute(
|
||||
builder: (context, state, child) => RootShellScreen(child: child),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => LibraryScreen(),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: 'album',
|
||||
builder: (context, state) => AlbumScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: 'artist',
|
||||
builder: (context, state) => ArtistScreen(),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
path: '/now-playing',
|
||||
builder: (context, state) => NowPlayingScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/settings',
|
||||
builder: (context, state) => SettingsScreen(),
|
||||
),
|
||||
],
|
||||
);
|
||||
Reference in New Issue
Block a user