diff --git a/lib/themes.dart b/lib/themes.dart index d7f572a..efef5dc 100644 --- a/lib/themes.dart +++ b/lib/themes.dart @@ -83,30 +83,30 @@ BrightnessBased getBrightnessBasedThemeData(AppColorScheme theme) { ); return baseTheme .copyWith( - textTheme: baseTheme.textTheme.withAppFonts(), - primaryTextTheme: baseTheme.primaryTextTheme.withAppFonts(), - accentTextTheme: baseTheme.accentTextTheme.withAppFonts(), - bottomAppBarTheme: baseTheme.bottomAppBarTheme.copyWith( - shape: StadiumBorderNotchedRectangle(), - color: colorScheme.primary, - ), - bottomSheetTheme: baseTheme.bottomSheetTheme.copyWith( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical( - top: Radius.circular(16), + textTheme: baseTheme.textTheme.withAppFonts(), + primaryTextTheme: baseTheme.primaryTextTheme.withAppFonts(), + accentTextTheme: baseTheme.accentTextTheme.withAppFonts(), + bottomAppBarTheme: baseTheme.bottomAppBarTheme.copyWith( + shape: StadiumBorderNotchedRectangle(), + color: colorScheme.primary, ), - ), - backgroundColor: colorScheme.surface, - ), - cardTheme: baseTheme.cardTheme.copyWith( - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), - shape: RoundedRectangleBorder( - borderRadius: const BorderRadius.all( - Radius.circular(8.0), + bottomSheetTheme: baseTheme.bottomSheetTheme.copyWith( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(16), + ), + ), + backgroundColor: colorScheme.surface, ), - ), - ), - ) + cardTheme: baseTheme.cardTheme.copyWith( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + shape: RoundedRectangleBorder( + borderRadius: const BorderRadius.all( + Radius.circular(8.0), + ), + ), + ), + ) .asBrightnessBased(); } @@ -156,11 +156,8 @@ class BrightnessBased { "of Brightness.dark or Brightness.light."); } - T getByContext(BuildContext context) { - return get(MediaQuery - .of(context) - .platformBrightness); - } + T getByContext(BuildContext context) => + get(MediaQuery.of(context).platformBrightness); BrightnessBased(this._light, this._dark);