update theme selection
This commit is contained in:
@@ -8,14 +8,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:worker/core/router/app_router.dart';
|
||||
import 'package:worker/core/theme/colors.dart';
|
||||
import 'package:worker/features/account/presentation/pages/account_page.dart';
|
||||
import 'package:worker/features/home/presentation/pages/home_page.dart';
|
||||
import 'package:worker/features/loyalty/presentation/pages/loyalty_page.dart';
|
||||
import 'package:worker/features/main/presentation/providers/current_page_provider.dart';
|
||||
import 'package:worker/features/news/presentation/pages/news_list_page.dart';
|
||||
import 'package:worker/features/notifications/presentation/pages/notifications_page.dart';
|
||||
import 'package:worker/features/promotions/presentation/pages/promotions_page.dart';
|
||||
|
||||
/// Main Scaffold Page
|
||||
///
|
||||
@@ -31,6 +29,7 @@ class MainScaffold extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final currentIndex = ref.watch(currentPageIndexProvider);
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
// Define pages
|
||||
final pages = [
|
||||
@@ -48,11 +47,11 @@ class MainScaffold extends ConsumerWidget {
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: FloatingActionButton(
|
||||
onPressed: () => context.push(RouteNames.chat),
|
||||
backgroundColor: const Color(0xFF35C6F4), // Accent cyan color
|
||||
backgroundColor: colorScheme.tertiary,
|
||||
elevation: 4,
|
||||
child: const Icon(
|
||||
child: Icon(
|
||||
Icons.chat_bubble,
|
||||
color: AppColors.white,
|
||||
color: colorScheme.onTertiary,
|
||||
size: 28,
|
||||
),
|
||||
),
|
||||
@@ -60,7 +59,7 @@ class MainScaffold extends ConsumerWidget {
|
||||
: null,
|
||||
bottomNavigationBar: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: colorScheme.surface,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
@@ -74,9 +73,9 @@ class MainScaffold extends ConsumerWidget {
|
||||
height: 70,
|
||||
child: BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: Colors.white,
|
||||
selectedItemColor: AppColors.primaryBlue,
|
||||
unselectedItemColor: const Color(0xFF666666),
|
||||
backgroundColor: colorScheme.surface,
|
||||
selectedItemColor: colorScheme.primary,
|
||||
unselectedItemColor: colorScheme.onSurfaceVariant,
|
||||
selectedFontSize: 11,
|
||||
unselectedFontSize: 11,
|
||||
iconSize: 24,
|
||||
@@ -109,17 +108,17 @@ class MainScaffold extends ConsumerWidget {
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.danger,
|
||||
color: colorScheme.error,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 20,
|
||||
minHeight: 20,
|
||||
),
|
||||
child: const Text(
|
||||
child: Text(
|
||||
'5',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: colorScheme.onError,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user