Fixed CircularProgressIndicator color and position show in notification

This commit is contained in:
llsajjad
2025-09-23 16:07:44 +03:30
parent 1f60954c53
commit 1901b84b2d
4 changed files with 60 additions and 32 deletions
@@ -92,7 +92,9 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
), ),
), ),
SizedBox(height: 12.0.h()), SizedBox(height: 12.0.h()),
Expanded( viewModel.isLoading
? Container()
: Expanded(
child: TabBarView( child: TabBarView(
controller: controller, controller: controller,
children: const [ children: const [
@@ -102,6 +104,15 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
], ],
), ),
), ),
if (viewModel.isLoading) ...[
const Spacer(),
const Center(
child: CircularProgressIndicator(
color: AppColors.secondary50,
),
),
const Spacer(),
],
SizedBox(height: 10.0.h()), SizedBox(height: 10.0.h()),
Row( Row(
children: [ children: [
@@ -98,20 +98,26 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
), ),
), ),
SizedBox(height: 12.0.h()), SizedBox(height: 12.0.h()),
Expanded( viewModel.isLoading
? Container()
: Expanded(
child: TabBarView( child: TabBarView(
controller: controller, controller: controller,
children: [ children: [
NotificationAllTab(scrollController: _scrollController), NotificationAllTab(scrollController: _scrollController),
NotificationUnreadTab(scrollController: _scrollController), NotificationUnreadTab(scrollController: _scrollController),
NotificationImportantTab(scrollController: _scrollController), NotificationImportantTab(
scrollController: _scrollController,
),
], ],
), ),
), ),
if (viewModel.isLoading) ...[ if (viewModel.isLoading) ...[
SizedBox(height: 10.0.h()), const Spacer(),
const Center(child: CircularProgressIndicator()), const Center(
SizedBox(height: 10.0.h()), child: CircularProgressIndicator(color: AppColors.secondary50),
),
const Spacer(),
], ],
], ],
), ),
@@ -96,7 +96,9 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
), ),
), ),
SizedBox(height: 12.0.h()), SizedBox(height: 12.0.h()),
Expanded( viewModel.isLoading
? Container()
: Expanded(
child: TabBarView( child: TabBarView(
controller: controller, controller: controller,
children: const [ children: const [
@@ -106,6 +108,15 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
], ],
), ),
), ),
if (viewModel.isLoading) ...[
const Spacer(),
const Center(
child: CircularProgressIndicator(
color: AppColors.secondary50,
),
),
const Spacer(),
],
SizedBox(height: 10.0.h()), SizedBox(height: 10.0.h()),
Row( Row(
children: [ children: [