Theme Mode-System Default, Minor Changes & Logout Button #1
This commit is contained in:
@@ -10,7 +10,7 @@ class ThemeModeCubit extends Cubit<ThemeModeState> {
|
||||
|
||||
Future<void> loadThemeMode() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final modeIndex = prefs.getInt('theme_mode') ?? 2; // default system
|
||||
final modeIndex = prefs.getInt('theme_mode') ?? 0; // default system
|
||||
final mode = ThemeMode.values[modeIndex];
|
||||
emit(ThemeModeState(mode: mode));
|
||||
}
|
||||
|
@@ -194,7 +194,7 @@ class LoginScreenState extends State<LoginScreen>
|
||||
? const CircularProgressIndicator()
|
||||
: Text(
|
||||
AppLocalizations.of(context).login,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimaryContainer),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -225,10 +225,11 @@ class LoginScreenState extends State<LoginScreen>
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Theme.of(context).primaryColorLight,
|
||||
foregroundColor: Theme.of(context).colorScheme.onSurface,
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
child: Text(AppLocalizations.of(context).register),
|
||||
child: Text(AppLocalizations.of(context).register,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@@ -90,7 +90,7 @@ class _BeneficiaryResultPageState extends State<BeneficiaryResultPage> {
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).done,
|
||||
style: const TextStyle(fontSize: 18), // slightly bigger text
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimaryContainer), // slightly bigger text
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@@ -20,8 +20,6 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardManagement,
|
||||
style:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
|
@@ -663,7 +663,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
icon,
|
||||
size: 30,
|
||||
color: disable
|
||||
? theme.colorScheme.onSurface.withValues(alpha: 0.3)
|
||||
? theme.colorScheme.onSurface.withOpacity(0.3)
|
||||
: theme.colorScheme.primary,
|
||||
grade: 200,
|
||||
weight: 700,
|
||||
|
@@ -91,15 +91,15 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: _shareScreenshot,
|
||||
icon: const Icon(Icons.share, size: 18),
|
||||
label: Text(AppLocalizations.of(context).share),
|
||||
label: Text(AppLocalizations.of(context).share,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimaryContainer),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor:
|
||||
backgroundColor: Theme.of(context).primaryColorDark,
|
||||
foregroundColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
foregroundColor: Theme.of(context).primaryColorLight,
|
||||
side: BorderSide(color: Theme.of(context).colorScheme.outline, width: 1),
|
||||
elevation: 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
0
lib/features/profile/preferences/logout_dialog.dart
Normal file
0
lib/features/profile/preferences/logout_dialog.dart
Normal file
@@ -27,6 +27,12 @@ class ProfileScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
// You can add more profile options here later
|
||||
ListTile(
|
||||
leading: const Icon(Icons.logout),
|
||||
title: const Text("Logout"), // Localized "Preferences"
|
||||
onTap: () {
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@@ -20,8 +20,6 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).services,
|
||||
style:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
|
Reference in New Issue
Block a user