Skip to content

Commit be2f028

Browse files
authored
Merge pull request #13 from aliahmad79/master
2 parents 4b78220 + 4609d7b commit be2f028

File tree

4 files changed

+29
-28
lines changed

4 files changed

+29
-28
lines changed

lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class MyApp extends StatelessWidget {
1919
final themeChanger = Provider.of<ThemeChanger>(context);
2020
return MaterialApp(
2121
title: TITLE,
22+
debugShowCheckedModeBanner: false,
2223
themeMode: themeChanger.getTheme,
2324
darkTheme: Style.get(true),
2425
theme: Style.get(false),

lib/tabs/home_tab.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ListHeading extends StatelessWidget {
5555
Navigator.push(context, MaterialPageRoute(builder: (context) => SingleCategory(category)));
5656
},
5757
child: Container(
58-
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0), color: Theme.of(context).textSelectionColor),
58+
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0), color: Theme.of(context).colorScheme.secondary),
5959
padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 6.0),
6060
child: Text('Show All'),
6161
),

lib/theme.dart

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,27 @@ class Style {
55
Color backgroundColor = isDark ? Colors.black : Colors.white;
66
Color foregroundColor = isDark ? Colors.white : Colors.black;
77
return ThemeData(
8-
brightness: isDark ? Brightness.dark : Brightness.light,
8+
// brightness: isDark ? Brightness.dark : Brightness.light,
99
backgroundColor: backgroundColor,
1010
canvasColor: backgroundColor,
11-
textSelectionColor: isDark ? Colors.white12 : Colors.grey.shade300,
1211
primaryColor: Color(0xFF249991),
13-
accentColor: Color(0xFF249991),
1412
appBarTheme: AppBarTheme(
15-
textTheme: TextTheme(
13+
color: backgroundColor,
14+
foregroundColor: foregroundColor,
15+
elevation: 0,
16+
iconTheme: IconThemeData(color: foregroundColor), toolbarTextStyle: TextTheme(
1617
titleMedium: TextStyle(
1718
color: foregroundColor,
1819
fontSize: 24.0,
1920
fontWeight: FontWeight.bold,
2021
),
21-
),
22-
color: backgroundColor,
23-
elevation: 0,
24-
iconTheme: IconThemeData(color: foregroundColor)),
22+
).bodyText2, titleTextStyle: TextTheme(
23+
titleMedium: TextStyle(
24+
color: foregroundColor,
25+
fontSize: 24.0,
26+
fontWeight: FontWeight.bold,
27+
),
28+
).headline6),
2529
textTheme: TextTheme(
2630
bodyText1: TextStyle(color: foregroundColor, fontWeight: FontWeight.bold),
2731
bodyText2: TextStyle(
@@ -31,6 +35,9 @@ class Style {
3135
fontFamily: 'Roboto',
3236
),
3337
),
38+
colorScheme: ColorScheme.fromSwatch()
39+
.copyWith(secondary: Color(0xFF249991), brightness: isDark ? Brightness.dark : Brightness.light),
40+
textSelectionTheme: TextSelectionThemeData(selectionColor: isDark ? Colors.white12 : Colors.grey.shade300),
3441
);
3542
}
3643
}

pubspec.lock

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.8.2"
10+
version: "2.9.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -42,14 +42,7 @@ packages:
4242
name: characters
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.2.0"
46-
charcode:
47-
dependency: transitive
48-
description:
49-
name: charcode
50-
url: "https://pub.dartlang.org"
51-
source: hosted
52-
version: "1.3.1"
45+
version: "1.2.1"
5346
chewie:
5447
dependency: transitive
5548
description:
@@ -70,7 +63,7 @@ packages:
7063
name: clock
7164
url: "https://pub.dartlang.org"
7265
source: hosted
73-
version: "1.1.0"
66+
version: "1.1.1"
7467
collection:
7568
dependency: transitive
7669
description:
@@ -105,7 +98,7 @@ packages:
10598
name: fake_async
10699
url: "https://pub.dartlang.org"
107100
source: hosted
108-
version: "1.3.0"
101+
version: "1.3.1"
109102
ffi:
110103
dependency: transitive
111104
description:
@@ -218,21 +211,21 @@ packages:
218211
name: matcher
219212
url: "https://pub.dartlang.org"
220213
source: hosted
221-
version: "0.12.11"
214+
version: "0.12.12"
222215
material_color_utilities:
223216
dependency: transitive
224217
description:
225218
name: material_color_utilities
226219
url: "https://pub.dartlang.org"
227220
source: hosted
228-
version: "0.1.4"
221+
version: "0.1.5"
229222
meta:
230223
dependency: transitive
231224
description:
232225
name: meta
233226
url: "https://pub.dartlang.org"
234227
source: hosted
235-
version: "1.7.0"
228+
version: "1.8.0"
236229
nested:
237230
dependency: transitive
238231
description:
@@ -260,7 +253,7 @@ packages:
260253
name: path
261254
url: "https://pub.dartlang.org"
262255
source: hosted
263-
version: "1.8.1"
256+
version: "1.8.2"
264257
path_drawing:
265258
dependency: transitive
266259
description:
@@ -391,7 +384,7 @@ packages:
391384
name: source_span
392385
url: "https://pub.dartlang.org"
393386
source: hosted
394-
version: "1.8.2"
387+
version: "1.9.0"
395388
sqflite:
396389
dependency: transitive
397390
description:
@@ -426,7 +419,7 @@ packages:
426419
name: string_scanner
427420
url: "https://pub.dartlang.org"
428421
source: hosted
429-
version: "1.1.0"
422+
version: "1.1.1"
430423
synchronized:
431424
dependency: transitive
432425
description:
@@ -440,14 +433,14 @@ packages:
440433
name: term_glyph
441434
url: "https://pub.dartlang.org"
442435
source: hosted
443-
version: "1.2.0"
436+
version: "1.2.1"
444437
test_api:
445438
dependency: transitive
446439
description:
447440
name: test_api
448441
url: "https://pub.dartlang.org"
449442
source: hosted
450-
version: "0.4.9"
443+
version: "0.4.12"
451444
tuple:
452445
dependency: transitive
453446
description:

0 commit comments

Comments
 (0)