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
+1 -1
View File
@@ -43,7 +43,7 @@ class NotificationsService {
method: 'POST',
(json) => NotificationResponseModel.fromJson(json),
data: data,
);
);
return result;
}
@@ -92,16 +92,27 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
),
),
SizedBox(height: 12.0.h()),
Expanded(
child: TabBarView(
controller: controller,
children: const [
NotificationAllTab(),
NotificationUnreadTab(),
NotificationImportantTab(),
],
viewModel.isLoading
? Container()
: Expanded(
child: TabBarView(
controller: controller,
children: const [
NotificationAllTab(),
NotificationUnreadTab(),
NotificationImportantTab(),
],
),
),
if (viewModel.isLoading) ...[
const Spacer(),
const Center(
child: CircularProgressIndicator(
color: AppColors.secondary50,
),
),
),
const Spacer(),
],
SizedBox(height: 10.0.h()),
Row(
children: [
@@ -98,20 +98,26 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
),
),
SizedBox(height: 12.0.h()),
Expanded(
child: TabBarView(
controller: controller,
children: [
NotificationAllTab(scrollController: _scrollController),
NotificationUnreadTab(scrollController: _scrollController),
NotificationImportantTab(scrollController: _scrollController),
],
),
),
viewModel.isLoading
? Container()
: Expanded(
child: TabBarView(
controller: controller,
children: [
NotificationAllTab(scrollController: _scrollController),
NotificationUnreadTab(scrollController: _scrollController),
NotificationImportantTab(
scrollController: _scrollController,
),
],
),
),
if (viewModel.isLoading) ...[
SizedBox(height: 10.0.h()),
const Center(child: CircularProgressIndicator()),
SizedBox(height: 10.0.h()),
const Spacer(),
const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
),
const Spacer(),
],
],
),
@@ -96,16 +96,27 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
),
),
SizedBox(height: 12.0.h()),
Expanded(
child: TabBarView(
controller: controller,
children: const [
NotificationAllTab(),
NotificationUnreadTab(),
NotificationImportantTab(),
],
viewModel.isLoading
? Container()
: Expanded(
child: TabBarView(
controller: controller,
children: const [
NotificationAllTab(),
NotificationUnreadTab(),
NotificationImportantTab(),
],
),
),
if (viewModel.isLoading) ...[
const Spacer(),
const Center(
child: CircularProgressIndicator(
color: AppColors.secondary50,
),
),
),
const Spacer(),
],
SizedBox(height: 10.0.h()),
Row(
children: [