improve asnyc loading and error widgets
This commit is contained in:
@@ -190,7 +190,7 @@ class FeedArticleListScreen extends HookConsumerWidget {
|
||||
exception: error,
|
||||
),
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -93,7 +93,7 @@ class FeedListScreen extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
label: const Text('Feed'),
|
||||
|
||||
@@ -146,7 +146,13 @@ class FeedCard extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
error: (error, stackTrace) => const Text('N/A'),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
loading: () => const SizedBox(
|
||||
height: 16,
|
||||
width: 16,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user