mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-14 18:57:41 +02:00
fix(mobile): stabilize router and add loading timeout/retry on playlists screen
This commit is contained in:
1 parent
180b57e1b7
commit
e4f8ebcf8f
2 files changed
+26
-4
No files matched your search
@@ -40,7 +40,27 @@ class MobilePlaylistSelectionScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
body: playlistsAsync.when(
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
loading: () => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(height: 24),
|
||||
FutureBuilder(
|
||||
future: Future.delayed(const Duration(seconds: 5)),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
return TextButton(
|
||||
onPressed: () => ref.refresh(playlistsProvider),
|
||||
child: const Text('Still loading? Tap to retry'),
|
||||
);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
Reference in new issue
Block a user