@@ -24,7 +24,7 @@ class _NavDrawerState extends State<NavDrawer> {
2424 shape: const RoundedRectangleBorder (
2525 borderRadius: BorderRadius .zero,
2626 ),
27- backgroundColor: const Color ( 0xFFFAFAFA ) ,
27+ backgroundColor: Theme . of (context).colorScheme.surface ,
2828 child: ScrollConfiguration (
2929 behavior: const ScrollBehavior (),
3030 child: ListView (
@@ -37,10 +37,9 @@ class _NavDrawerState extends State<NavDrawer> {
3737 SizedBox (
3838 height: 80 ,
3939 width: 80 ,
40- child: Image .asset (
41- navHeaderLogo,
42- fit: BoxFit .contain,
43- ),
40+ child: Image .asset (navHeaderLogo,
41+ fit: BoxFit .contain,
42+ color: Theme .of (context).colorScheme.onSurface),
4443 ),
4544 Consumer <BoardStateProvider >(
4645 builder: (context, provider, _) {
@@ -67,7 +66,9 @@ class _NavDrawerState extends State<NavDrawer> {
6766 title: Text (
6867 'Instruments' ,
6968 style: TextStyle (
70- color: widget.selectedIndex == 0 ? Colors .red : Colors .black,
69+ color: widget.selectedIndex == 0
70+ ? Colors .red
71+ : Theme .of (context).colorScheme.onSurface,
7172 fontWeight: FontWeight .bold,
7273 fontSize: 14 ,
7374 ),
@@ -98,7 +99,9 @@ class _NavDrawerState extends State<NavDrawer> {
9899 title: Text (
99100 'Logged Data' ,
100101 style: TextStyle (
101- color: widget.selectedIndex == 1 ? Colors .red : Colors .black,
102+ color: widget.selectedIndex == 1
103+ ? Colors .red
104+ : Theme .of (context).colorScheme.onSurface,
102105 fontWeight: FontWeight .bold,
103106 fontSize: 14 ,
104107 ),
@@ -118,7 +121,9 @@ class _NavDrawerState extends State<NavDrawer> {
118121 title: Text (
119122 'Connect Device' ,
120123 style: TextStyle (
121- color: widget.selectedIndex == 2 ? Colors .red : Colors .black,
124+ color: widget.selectedIndex == 2
125+ ? Colors .red
126+ : Theme .of (context).colorScheme.onSurface,
122127 fontWeight: FontWeight .bold,
123128 fontSize: 14 ,
124129 ),
@@ -147,7 +152,9 @@ class _NavDrawerState extends State<NavDrawer> {
147152 title: Text (
148153 'Generate Config File' ,
149154 style: TextStyle (
150- color: widget.selectedIndex == 3 ? Colors .red : Colors .black,
155+ color: widget.selectedIndex == 3
156+ ? Colors .red
157+ : Theme .of (context).colorScheme.onSurface,
151158 fontWeight: FontWeight .bold,
152159 fontSize: 14 ,
153160 ),
@@ -166,7 +173,9 @@ class _NavDrawerState extends State<NavDrawer> {
166173 title: Text (
167174 'Settings' ,
168175 style: TextStyle (
169- color: widget.selectedIndex == 4 ? Colors .red : Colors .black,
176+ color: widget.selectedIndex == 4
177+ ? Colors .red
178+ : Theme .of (context).colorScheme.onSurface,
170179 fontWeight: FontWeight .bold,
171180 fontSize: 14 ,
172181 ),
@@ -195,7 +204,9 @@ class _NavDrawerState extends State<NavDrawer> {
195204 title: Text (
196205 'About Us' ,
197206 style: TextStyle (
198- color: widget.selectedIndex == 5 ? Colors .red : Colors .black,
207+ color: widget.selectedIndex == 5
208+ ? Colors .red
209+ : Theme .of (context).colorScheme.onSurface,
199210 fontWeight: FontWeight .bold,
200211 fontSize: 14 ,
201212 ),
@@ -223,7 +234,9 @@ class _NavDrawerState extends State<NavDrawer> {
223234 title: Text (
224235 'Documentation' ,
225236 style: TextStyle (
226- color: widget.selectedIndex == 6 ? Colors .red : Colors .black,
237+ color: widget.selectedIndex == 6
238+ ? Colors .red
239+ : Theme .of (context).colorScheme.onSurface,
227240 fontWeight: FontWeight .bold,
228241 fontSize: 14 ,
229242 ),
@@ -242,7 +255,9 @@ class _NavDrawerState extends State<NavDrawer> {
242255 title: Text (
243256 'Rate App' ,
244257 style: TextStyle (
245- color: widget.selectedIndex == 7 ? Colors .red : Colors .black,
258+ color: widget.selectedIndex == 7
259+ ? Colors .red
260+ : Theme .of (context).colorScheme.onSurface,
246261 fontWeight: FontWeight .bold,
247262 fontSize: 14 ,
248263 ),
@@ -261,7 +276,9 @@ class _NavDrawerState extends State<NavDrawer> {
261276 title: Text (
262277 'Buy PSLab' ,
263278 style: TextStyle (
264- color: widget.selectedIndex == 8 ? Colors .red : Colors .black,
279+ color: widget.selectedIndex == 8
280+ ? Colors .red
281+ : Theme .of (context).colorScheme.onSurface,
265282 fontWeight: FontWeight .bold,
266283 fontSize: 14 ,
267284 ),
@@ -280,7 +297,9 @@ class _NavDrawerState extends State<NavDrawer> {
280297 title: Text (
281298 'FAQ' ,
282299 style: TextStyle (
283- color: widget.selectedIndex == 9 ? Colors .red : Colors .black,
300+ color: widget.selectedIndex == 9
301+ ? Colors .red
302+ : Theme .of (context).colorScheme.onSurface,
284303 fontWeight: FontWeight .bold,
285304 fontSize: 14 ,
286305 ),
@@ -299,7 +318,9 @@ class _NavDrawerState extends State<NavDrawer> {
299318 title: Text (
300319 'Share App' ,
301320 style: TextStyle (
302- color: widget.selectedIndex == 10 ? Colors .red : Colors .black,
321+ color: widget.selectedIndex == 10
322+ ? Colors .red
323+ : Theme .of (context).colorScheme.onSurface,
303324 fontWeight: FontWeight .bold,
304325 fontSize: 14 ,
305326 ),
@@ -318,7 +339,9 @@ class _NavDrawerState extends State<NavDrawer> {
318339 title: Text (
319340 'Privacy Policy' ,
320341 style: TextStyle (
321- color: widget.selectedIndex == 11 ? Colors .red : Colors .black,
342+ color: widget.selectedIndex == 11
343+ ? Colors .red
344+ : Theme .of (context).colorScheme.onSurface,
322345 fontWeight: FontWeight .bold,
323346 fontSize: 14 ,
324347 ),
@@ -337,7 +360,9 @@ class _NavDrawerState extends State<NavDrawer> {
337360 title: Text (
338361 softwareLicenses,
339362 style: TextStyle (
340- color: widget.selectedIndex == 12 ? Colors .red : Colors .black,
363+ color: widget.selectedIndex == 12
364+ ? Colors .red
365+ : Theme .of (context).colorScheme.onSurface,
341366 fontWeight: FontWeight .bold,
342367 fontSize: 14 ,
343368 ),
0 commit comments