Skip to content

Commit 9a3608d

Browse files
authored
Merge pull request #82 from Akshatji800/Issue-81
fix: Resolves incompatible theme bug issue in the sidemenubar drawer option in light mode.
2 parents 5e4f594 + a880218 commit 9a3608d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/Components/nav_drawer_list_tile.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import 'package:flutter/material.dart';
22

3+
import '../Constants/theme_provider.dart';
4+
35
// ignore: must_be_immutable
46
class NavDrawerListTile extends StatelessWidget {
57
VoidCallback onTap;
@@ -16,11 +18,11 @@ class NavDrawerListTile extends StatelessWidget {
1618
onTap: onTap,
1719
leading: Icon(
1820
icon,
19-
color: Colors.white,
21+
color: ThemeProvider.theme.textTheme.bodyText1?.color,
2022
),
2123
title: Text(
2224
title,
23-
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
25+
style: TextStyle(color: ThemeProvider.theme.textTheme.bodyText1?.color, fontWeight: FontWeight.w400),
2426
),
2527
);
2628
}

lib/Constants/theme_provider.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class MyThemes {
2626
primaryColorLight: Color(0xff305067),
2727
accentColor: Color(0xff399CF4),
2828
backgroundColor: Color(0xff305067),
29+
scaffoldBackgroundColor: Color(0xff305067),
2930
textTheme: TextTheme().apply(
3031
displayColor: Colors.white,
3132
bodyColor: Colors.white,
@@ -43,6 +44,7 @@ class MyThemes {
4344
primaryColor: Colors.white,
4445
primaryColorDark: Color(0xff39C481),
4546
backgroundColor: Color(0xff293341),
47+
scaffoldBackgroundColor: Colors.grey[300],
4648
accentColor: Color(0xff399CF4),
4749
canvasColor: Colors.transparent,
4850
primaryColorLight: Colors.grey[100],

lib/Pages/home_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class _MenuState extends State<Menu> {
157157
double hp = MediaQuery.of(context).size.height;
158158
return Scaffold(
159159
body: Container(
160-
color: ThemeProvider.theme.backgroundColor,
160+
color: ThemeProvider.theme.scaffoldBackgroundColor,
161161
width: double.maxFinite,
162162
height: double.maxFinite,
163163
padding: const EdgeInsets.only(top: 30.0, left: 5),

0 commit comments

Comments
 (0)