diameter/lib/components/app_theme.dart

53 lines
1.6 KiB
Dart
Raw Normal View History

2021-10-22 23:08:09 +00:00
import 'package:flex_color_scheme/flex_color_scheme.dart';
import 'package:flutter/material.dart';
class AppTheme {
AppTheme._();
static ThemeData lightTheme = FlexColorScheme.light(
2022-03-21 00:07:29 +00:00
surfaceStyle: FlexSurface.medium,
scheme: FlexScheme.aquaBlue,
fontFamily: 'Roboto',
2021-10-22 23:08:09 +00:00
).toTheme;
2022-03-21 00:07:29 +00:00
static ThemeData darkTheme = FlexColorScheme.dark(
scheme: FlexScheme.aquaBlue,
fontFamily: 'Roboto',
2021-10-22 23:08:09 +00:00
).toTheme;
static ThemeData makeTheme(ThemeData baseThemeData) {
return baseThemeData.copyWith(
2022-03-21 00:07:29 +00:00
cardTheme: baseThemeData.cardTheme.copyWith(
color: baseThemeData.bottomAppBarColor,
elevation: 1,
margin: const EdgeInsets.only(bottom: 10.0),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
),
),
scrollbarTheme: baseThemeData.scrollbarTheme.copyWith(
2022-03-21 00:08:05 +00:00
// thumbVisibility: MaterialStateProperty.all(true),
2022-03-21 00:07:29 +00:00
isAlwaysShown: true,
),
textTheme: baseThemeData.textTheme.copyWith(
subtitle2: TextStyle(
color: baseThemeData.primaryColor,
letterSpacing: 2.0,
),
),
inputDecorationTheme: baseThemeData.inputDecorationTheme.copyWith(
fillColor: baseThemeData.textSelectionTheme.selectionColor,
border: const UnderlineInputBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8.0),
topRight: Radius.circular(8.0),
),
),
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: baseThemeData.primaryColor,
),
);
2021-10-22 23:08:09 +00:00
}
}