notifications colors fix
This commit is contained in:
@@ -102,21 +102,19 @@ class AppColors {
|
||||
|
||||
static Color get primary10Light =>
|
||||
_isDarkMode
|
||||
? const Color.fromRGBO(104, 151, 151, 0.2)
|
||||
? const Color.fromRGBO(41, 111, 221, 0.05)
|
||||
: const Color(0xFFF7FAFF);
|
||||
|
||||
static Color get primary20 =>
|
||||
_isDarkMode
|
||||
? const Color.fromRGBO(111, 134, 165, 0.2)
|
||||
: const Color.fromRGBO(11, 134, 165, 0.2);
|
||||
? const Color.fromRGBO(115, 134, 165, 0.3)
|
||||
: const Color.fromRGBO(229, 239, 255, 1);
|
||||
|
||||
static Color get primary30 =>
|
||||
_isDarkMode ? const Color(0xFF06162E) : const Color(0xFFD9E8FF);
|
||||
|
||||
static Color get orange10 =>
|
||||
_isDarkMode
|
||||
? const Color.fromRGBO(131, 120, 105, 0.2)
|
||||
: const Color(0xFFFFF2DE);
|
||||
_isDarkMode ? const Color(0xFF2D2923) : const Color(0xFFFFF7EB);
|
||||
|
||||
static Color get orange0 =>
|
||||
_isDarkMode
|
||||
@@ -156,6 +154,9 @@ class AppColors {
|
||||
static Color get purpleLight =>
|
||||
_isDarkMode ? const Color(0xFFEAE6EF) : const Color(0xFFEAE6EF);
|
||||
|
||||
static Color get orange20 =>
|
||||
_isDarkMode ? const Color(0xFF6B5E4B) : const Color(0xFFF6D7AB);
|
||||
|
||||
static Color get red0 =>
|
||||
_isDarkMode
|
||||
? const Color(0xFF312F2F)
|
||||
@@ -181,5 +182,4 @@ class AppColors {
|
||||
static const Color yellow4 = Color(0xFFC07A25);
|
||||
static const Color secondaryborder = Color(0xFFCDCDCD);
|
||||
static const Color secondaryborder2 = Color(0xFFDADADA);
|
||||
static const Color orange20 = Color(0xFFF6D7AB);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
|
||||
const Expanded(
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: AppColors.secondary50,
|
||||
color: AppColors.cyanTeal,
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -150,9 +150,10 @@ class _DesktopNotificationPageState extends State<DesktopNotificationPage>
|
||||
onTap: () async {
|
||||
final selectedPage = await showDialog<int>(
|
||||
context: context,
|
||||
builder: (context) => PageSelectionDialog(
|
||||
totalPages: totalPages,
|
||||
),
|
||||
builder:
|
||||
(context) => PageSelectionDialog(
|
||||
totalPages: totalPages,
|
||||
),
|
||||
);
|
||||
|
||||
if (selectedPage != null) {
|
||||
|
||||
@@ -103,7 +103,7 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
|
||||
children: [
|
||||
NotificationAllTab(scrollController: _scrollAll),
|
||||
NotificationUnreadTab(scrollController: _scrollUnread),
|
||||
NotificationImportantTab(scrollController: _scrollImportant),
|
||||
NotificationImportantTab(scrollController: _scrollImportant),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -112,7 +112,7 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(color: AppColors.secondary50),
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -120,7 +120,7 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(color: AppColors.secondary50),
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -128,7 +128,7 @@ class _MobileNotificationPageState extends State<MobileNotificationPage>
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(color: AppColors.secondary50),
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -119,9 +119,7 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
|
||||
if (isLoading)
|
||||
const Expanded(
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: AppColors.secondary50,
|
||||
),
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
),
|
||||
)
|
||||
else
|
||||
@@ -152,9 +150,9 @@ class _TabletNotificationPageState extends State<TabletNotificationPage>
|
||||
onTap: () async {
|
||||
final selectedPage = await showDialog<int>(
|
||||
context: context,
|
||||
builder: (context) => PageSelectionDialog(
|
||||
totalPages: totalPages,
|
||||
),
|
||||
builder:
|
||||
(context) =>
|
||||
PageSelectionDialog(totalPages: totalPages),
|
||||
);
|
||||
|
||||
if (selectedPage != null) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/view_models/notification_view_model.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
|
||||
import '../../../core/theme/colors.dart';
|
||||
import 'notification_card.dart';
|
||||
|
||||
class NotificationAllTab extends StatelessWidget {
|
||||
@@ -16,7 +17,9 @@ class NotificationAllTab extends StatelessWidget {
|
||||
|
||||
if (viewModel.isLoadingAll &&
|
||||
(viewModel.allNotificationResponse?.data?.isEmpty ?? true)) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
);
|
||||
}
|
||||
|
||||
final notifications = viewModel.allNotificationResponse?.data ?? [];
|
||||
@@ -38,4 +41,3 @@ class NotificationAllTab extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,10 @@ class NotificationCard extends StatelessWidget {
|
||||
const Spacer(),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
viewModel.markAsRead(notificationId: notification.id!);
|
||||
if (!notification.seen!) {
|
||||
viewModel.markAsRead(notificationId: notification.id!);
|
||||
}
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
|
||||
@@ -26,7 +26,7 @@ class NotificationMoreDialog extends StatelessWidget {
|
||||
return Dialog(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
insetPadding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4)),
|
||||
child: Container(
|
||||
width:
|
||||
Size(SizeConfig.screenWidth, SizeConfig.screenHeight).displaySize ==
|
||||
@@ -38,6 +38,11 @@ class NotificationMoreDialog extends StatelessWidget {
|
||||
DisplaySize.large
|
||||
? 720
|
||||
: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: AppColors.primary10Light,
|
||||
border: Border.all(color: AppColors.primary20),
|
||||
),
|
||||
// margin: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 16.0.h()),
|
||||
child: Column(
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/view_models/notification_view_model.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
|
||||
import 'notification_card.dart';
|
||||
|
||||
class NotificationUnreadTab extends StatelessWidget {
|
||||
@@ -14,7 +16,9 @@ class NotificationUnreadTab extends StatelessWidget {
|
||||
final viewModel = context.watch<NotificationViewModel>();
|
||||
if (viewModel.isLoadingUnread &&
|
||||
(viewModel.unreadNotificationResponse?.data?.isEmpty ?? true)) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(color: AppColors.cyanTeal),
|
||||
);
|
||||
}
|
||||
|
||||
final notifications = viewModel.unreadNotificationResponse?.data ?? [];
|
||||
|
||||
Reference in New Issue
Block a user