Skip to content

Commit

Permalink
Improve themes
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Aug 20, 2020
1 parent 25b7722 commit 12b0c26
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions lib/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ BrightnessBased<ThemeData> getBrightnessBasedThemeData(AppColorScheme theme) {
if (theme == AppColorScheme.Auto) {
// Delegate to light and dark theme.
return BrightnessBased(
() => getBrightnessBasedThemeData(AppColorScheme.Light).light,
() => getBrightnessBasedThemeData(AppColorScheme.Dark).dark,
() => getBrightnessBasedThemeData(AppColorScheme.Light).light,
() => getBrightnessBasedThemeData(AppColorScheme.Dark).dark,
);
}

Expand Down Expand Up @@ -98,14 +98,14 @@ BrightnessBased<ThemeData> getBrightnessBasedThemeData(AppColorScheme theme) {
),
backgroundColor: colorScheme.surface,
),
cardTheme: baseTheme.cardTheme.copyWith(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(
Radius.circular(8.0),
),
cardTheme: baseTheme.cardTheme.copyWith(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(
Radius.circular(8.0),
),
)
),
),
)
.asBrightnessBased();
}
Expand All @@ -115,9 +115,18 @@ extension AppFontsTextTheme on TextTheme {
return GoogleFonts.workSansTextTheme(
this,
).copyWith(
title: GoogleFonts.poppins(
textStyle: title,
fontWeight: FontWeight.w800,
headline1: GoogleFonts.poppins(textStyle: headline1),
headline2: GoogleFonts.poppins(textStyle: headline2),
headline3: GoogleFonts.poppins(textStyle: headline3),
headline4: GoogleFonts.poppins(textStyle: headline4),
headline5: GoogleFonts.poppins(textStyle: headline5),
headline6: GoogleFonts.poppins(
textStyle: headline6,
fontWeight: FontWeight.bold,
),
subtitle1: GoogleFonts.workSans(
textStyle: subtitle1,
fontWeight: FontWeight.w500,
),
button: GoogleFonts.poppins(
textStyle: button,
Expand Down

0 comments on commit 12b0c26

Please sign in to comment.