@@ -14,13 +14,14 @@ class _HomeScreenState extends State<HomeScreen> {
14
14
double scaleFactor = 1 ;
15
15
bool isDrawerOpen = false ;
16
16
double borderRadius = 0 ;
17
+ bool isDark = false ;
17
18
18
19
@override
19
20
Widget build (BuildContext context) {
20
21
return AnimatedContainer (
21
22
decoration: BoxDecoration (
22
23
borderRadius: BorderRadius .circular (borderRadius),
23
- color: Colors .white,
24
+ color: isDark ? Color ( 0xff373a40 ) : Colors .white,
24
25
boxShadow: [kDefaultShadow],
25
26
),
26
27
transform: Matrix4 .translationValues (xOffset, yOffset, 0 )
@@ -38,7 +39,10 @@ class _HomeScreenState extends State<HomeScreen> {
38
39
children: [
39
40
isDrawerOpen
40
41
? IconButton (
41
- icon: Icon (Icons .arrow_back_ios),
42
+ icon: Icon (
43
+ Icons .arrow_back_ios,
44
+ color: isDark ? Colors .white : Colors .black,
45
+ ),
42
46
onPressed: () {
43
47
setState (() {
44
48
xOffset = 0 ;
@@ -50,7 +54,9 @@ class _HomeScreenState extends State<HomeScreen> {
50
54
},
51
55
)
52
56
: IconButton (
53
- icon: SvgPicture .asset ('assets/icons/menu.svg' ),
57
+ icon: isDark
58
+ ? SvgPicture .asset ('assets/icons/menu_dark.svg' )
59
+ : SvgPicture .asset ('assets/icons/menu.svg' ),
54
60
onPressed: () {
55
61
setState (() {
56
62
xOffset = 230 ;
@@ -64,14 +70,14 @@ class _HomeScreenState extends State<HomeScreen> {
64
70
'Title101' ,
65
71
style: TextStyle (
66
72
fontSize: 20 ,
67
- color: Colors .black,
73
+ color: isDark ? Colors .white : Colors .black,
68
74
fontWeight: FontWeight .bold,
69
75
),
70
76
),
71
77
IconButton (
72
78
icon: Icon (
73
79
Icons .search,
74
- color: Colors .black,
80
+ color: isDark ? Colors .white : Colors .black,
75
81
size: 30 ,
76
82
),
77
83
onPressed: null ,
0 commit comments