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(
|
2021-11-24 23:19:27 +00:00
|
|
|
surfaceStyle: FlexSurface.medium,
|
2021-12-09 05:14:55 +00:00
|
|
|
scheme: FlexScheme.aquaBlue,
|
|
|
|
fontFamily: 'Roboto',
|
2021-10-22 23:08:09 +00:00
|
|
|
).toTheme;
|
|
|
|
|
2021-12-09 05:14:55 +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(
|
2021-12-09 05:14:55 +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(
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2021-11-24 23:19:27 +00:00
|
|
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
2021-12-09 05:14:55 +00:00
|
|
|
backgroundColor: baseThemeData.primaryColor,
|
|
|
|
),
|
|
|
|
);
|
2021-10-22 23:08:09 +00:00
|
|
|
}
|
|
|
|
}
|