feat: Update theme colors for improved visibility in light and dark modes across multiple components
This commit is contained in:
@@ -148,12 +148,23 @@ class _HomeContentState extends State<HomeContent> with AutomaticKeepAliveClient
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Bonjour ${user.prenom} !',
|
'Bonjour ${user.prenom} !',
|
||||||
style: const TextStyle(fontSize: 28, fontWeight: FontWeight.bold),
|
style: TextStyle(
|
||||||
|
fontSize: 28,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
'Vos voyages',
|
'Vos voyages',
|
||||||
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white70
|
||||||
|
: Colors.grey[600],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class SettingsThemeContent extends StatelessWidget {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Thème'),
|
title: const Text('Thème'),
|
||||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
||||||
),
|
),
|
||||||
body: BlocBuilder<ThemeBloc, ThemeState>(
|
body: BlocBuilder<ThemeBloc, ThemeState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
|
|||||||
@@ -171,6 +171,12 @@ class MyApp extends StatelessWidget {
|
|||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
),
|
),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
appBarTheme: const AppBarTheme(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
foregroundColor: Colors.black,
|
||||||
|
elevation: 0,
|
||||||
|
surfaceTintColor: Colors.transparent,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// Dark theme configuration
|
// Dark theme configuration
|
||||||
darkTheme: ThemeData(
|
darkTheme: ThemeData(
|
||||||
@@ -179,6 +185,12 @@ class MyApp extends StatelessWidget {
|
|||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
),
|
),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
appBarTheme: const AppBarTheme(
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
elevation: 0,
|
||||||
|
surfaceTintColor: Colors.transparent,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// Default page when app starts
|
// Default page when app starts
|
||||||
home: const LoginPage(),
|
home: const LoginPage(),
|
||||||
|
|||||||
@@ -134,8 +134,6 @@ class _HomePageState extends State<HomePage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(titles[_currentIndex]),
|
title: Text(titles[_currentIndex]),
|
||||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
),
|
),
|
||||||
drawer: Drawer(
|
drawer: Drawer(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
@@ -143,11 +141,18 @@ class _HomePageState extends State<HomePage> {
|
|||||||
children: [
|
children: [
|
||||||
DrawerHeader(
|
DrawerHeader(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.inversePrimary,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.black
|
||||||
|
: Colors.white,
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: Text(
|
||||||
"Travel Mate",
|
"Travel Mate",
|
||||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black,
|
||||||
|
fontSize: 24,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_buildDrawerItem(icon: Icons.home, title: "Mes voyages", index: 0),
|
_buildDrawerItem(icon: Icons.home, title: "Mes voyages", index: 0),
|
||||||
|
|||||||
Reference in New Issue
Block a user