mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-01 15:59:32 +00:00
debug: add extensive logging and error handling for series
This commit is contained in:
parent
e4a522cc0d
commit
f4d1914b21
2 changed files with 67 additions and 29 deletions
|
|
@ -19,8 +19,20 @@ class LibrarySeriesPage extends HookConsumerWidget {
|
|||
body: seriesAsync.when(
|
||||
data: (seriesList) {
|
||||
if (seriesList.isEmpty) {
|
||||
return const Center(
|
||||
child: Text('No series found'),
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.library_books_outlined, size: 48),
|
||||
const SizedBox(height: 16),
|
||||
const Text('No series found'),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Check logs for API response details',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -37,13 +49,25 @@ class LibrarySeriesPage extends HookConsumerWidget {
|
|||
child: CircularProgressIndicator(),
|
||||
),
|
||||
error: (error, stack) => Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.error_outline, size: 48, color: Colors.red),
|
||||
const SizedBox(height: 16),
|
||||
Text('Error loading series: $error'),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.error_outline, size: 48, color: Colors.red),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Error loading series:',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'$error',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue