Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Use colorScheme.background instead of backgroundColor #307

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions lib/constants/theme_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ TextStyle appbarStyle = AppText.b2b != null
final darkTheme = ThemeData(
primaryColor: Colors.black,
brightness: Brightness.dark,
backgroundColor: const Color(0xFF212121),
colorScheme: const ColorScheme.dark(
secondary: Colors.white,
),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
foregroundColor: Colors.black, backgroundColor: AppTheme.primaryColor),
dividerColor: Colors.black12,
Expand All @@ -31,16 +27,14 @@ final darkTheme = ThemeData(
elevation: 0,
color: Colors.black,
titleTextStyle: appbarStyle,
toolbarTextStyle: appbarStyle),
toolbarTextStyle: appbarStyle), colorScheme: const ColorScheme.dark(
secondary: Colors.white,
).copyWith(background: const Color(0xFF212121)),
);

final lightTheme = ThemeData(
primaryColor: AppTheme.primaryColor,
brightness: Brightness.light,
backgroundColor: Colors.blueGrey[100],
colorScheme: const ColorScheme.light(
secondary: Colors.black,
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
foregroundColor: Colors.white, backgroundColor: Colors.blue[600]),
dividerColor: AppTheme.primaryColor,
Expand All @@ -60,5 +54,7 @@ final lightTheme = ThemeData(
),
titleTextStyle: appbarStyle,
toolbarTextStyle: appbarStyle,
),
), colorScheme: const ColorScheme.light(
secondary: Colors.black,
).copyWith(background: Colors.blueGrey[100]),
);
Loading