feat(flutter/home): home screen with five sections
Sections mirror the web home: Recently added · Rediscover (albums + artists) · Most played · Last played artists. Tap routes pushed for albums/artists; track-tap is wired in the player task. Pull-to-refresh re-fetches /api/home.
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:go_router/go_router.dart';
|
||||
import '../auth/auth_provider.dart';
|
||||
import '../auth/login_screen.dart';
|
||||
import '../auth/server_url_screen.dart';
|
||||
import '../library/home_screen.dart';
|
||||
import 'widgets/version_gate.dart';
|
||||
|
||||
GoRouter buildRouter(Ref ref) {
|
||||
@@ -30,7 +31,7 @@ GoRouter buildRouter(Ref ref) {
|
||||
ShellRoute(
|
||||
builder: (ctx, state, child) => VersionGate(child: _ShellWithPlayerBar(child: child)),
|
||||
routes: [
|
||||
GoRoute(path: '/home', builder: (_, __) => const _HomePlaceholder()),
|
||||
GoRoute(path: '/home', builder: (_, __) => const HomeScreen()),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -51,9 +52,3 @@ class _ShellWithPlayerBar extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _HomePlaceholder extends StatelessWidget {
|
||||
const _HomePlaceholder();
|
||||
@override
|
||||
Widget build(BuildContext context) =>
|
||||
const Scaffold(body: Center(child: Text('Home — coming in Task 14')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user