mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-15 11:18:05 +02:00
feat: Implement initial mobile application structure including IPTV features, authentication, routing, and theming.
This commit is contained in:
1 parent
6ee7fa178a
commit
26ac5fb0b8
12 files changed
+2082
-3
No files matched your search
@@ -7,6 +7,9 @@ import '../../features/iptv/screens/playlist_selection_screen.dart';
|
||||
import '../../features/iptv/screens/dashboard_screen.dart';
|
||||
import '../../features/admin/screens/admin_panel.dart';
|
||||
import '../models/playlist_config.dart';
|
||||
import '../../mobile/features/auth/screens/mobile_login_screen.dart';
|
||||
import '../../mobile/features/iptv/screens/mobile_playlist_selection_screen.dart';
|
||||
import '../../mobile/features/iptv/screens/mobile_dashboard_screen.dart';
|
||||
|
||||
final routerProvider = Provider<GoRouter>((ref) {
|
||||
final authState = ref.watch(authProvider);
|
||||
@@ -43,18 +46,27 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/login',
|
||||
builder: (context, state) => const LoginScreen(),
|
||||
builder: (context, state) {
|
||||
if (MediaQuery.of(context).size.width < 768) {
|
||||
return const MobileLoginScreen();
|
||||
}
|
||||
return const LoginScreen();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: '/playlists',
|
||||
builder: (context, state) => const PlaylistSelectionScreen(),
|
||||
builder: (context, state) {
|
||||
if (MediaQuery.of(context).size.width < 768) {
|
||||
return const MobilePlaylistSelectionScreen();
|
||||
}
|
||||
return const PlaylistSelectionScreen();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: '/dashboard',
|
||||
builder: (context, state) {
|
||||
final playlist = state.extra as PlaylistConfig?;
|
||||
if (playlist == null) {
|
||||
// Redirect back if no playlist provided
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.go('/playlists');
|
||||
});
|
||||
@@ -62,6 +74,10 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
body: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
}
|
||||
|
||||
if (MediaQuery.of(context).size.width < 768) {
|
||||
return MobileDashboardScreen(playlist: playlist);
|
||||
}
|
||||
return DashboardScreen(playlist: playlist);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user