Skip to content

Commit

Permalink
Merge pull request #837 from threefoldtech/development_fix_news_layout
Browse files Browse the repository at this point in the history
Fix news loading layout
  • Loading branch information
zaelgohary authored Jan 6, 2025
2 parents 27c467c + 960821e commit 22fc49b
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions app/lib/apps/news/news_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,22 @@ class _NewsScreenState extends State<NewsScreen> {
@override
Widget build(BuildContext context) {
if (isInitialLoading) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const CircularProgressIndicator(),
const SizedBox(height: 15),
Text(
'Loading Articles...',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold),
),
],
);
return LayoutDrawer(
titleText: 'News',
content: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const CircularProgressIndicator(),
const SizedBox(height: 15),
Text(
'Loading Articles...',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold),
),
],
)));
}

return LayoutDrawer(
Expand Down

0 comments on commit 22fc49b

Please sign in to comment.