|
@@ -11,10 +11,6 @@ final lightThemeData = ThemeData(
|
|
iconTheme: const IconThemeData(color: Colors.black),
|
|
iconTheme: const IconThemeData(color: Colors.black),
|
|
primaryIconTheme:
|
|
primaryIconTheme:
|
|
const IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
|
const IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
|
- colorScheme: const ColorScheme.light(
|
|
|
|
- primary: Colors.black,
|
|
|
|
- secondary: Color.fromARGB(255, 163, 163, 163),
|
|
|
|
- ),
|
|
|
|
outlinedButtonTheme: buildOutlinedButtonThemeData(
|
|
outlinedButtonTheme: buildOutlinedButtonThemeData(
|
|
bgDisabled: const Color.fromRGBO(158, 158, 158, 1),
|
|
bgDisabled: const Color.fromRGBO(158, 158, 158, 1),
|
|
bgEnabled: const Color.fromRGBO(0, 0, 0, 1),
|
|
bgEnabled: const Color.fromRGBO(0, 0, 0, 1),
|
|
@@ -25,9 +21,7 @@ final lightThemeData = ThemeData(
|
|
onPrimary: const Color.fromRGBO(255, 255, 255, 1),
|
|
onPrimary: const Color.fromRGBO(255, 255, 255, 1),
|
|
primary: const Color.fromRGBO(0, 0, 0, 1),
|
|
primary: const Color.fromRGBO(0, 0, 0, 1),
|
|
),
|
|
),
|
|
- toggleableActiveColor: const Color.fromRGBO(102, 187, 106, 1),
|
|
|
|
scaffoldBackgroundColor: const Color.fromRGBO(255, 255, 255, 1),
|
|
scaffoldBackgroundColor: const Color.fromRGBO(255, 255, 255, 1),
|
|
- backgroundColor: const Color.fromRGBO(255, 255, 255, 1),
|
|
|
|
appBarTheme: const AppBarTheme().copyWith(
|
|
appBarTheme: const AppBarTheme().copyWith(
|
|
backgroundColor: Colors.white,
|
|
backgroundColor: Colors.white,
|
|
foregroundColor: Colors.black,
|
|
foregroundColor: Colors.black,
|
|
@@ -37,8 +31,8 @@ final lightThemeData = ThemeData(
|
|
//https://api.flutter.dev/flutter/material/TextTheme-class.html
|
|
//https://api.flutter.dev/flutter/material/TextTheme-class.html
|
|
textTheme: _buildTextTheme(const Color.fromRGBO(0, 0, 0, 1)),
|
|
textTheme: _buildTextTheme(const Color.fromRGBO(0, 0, 0, 1)),
|
|
primaryTextTheme: const TextTheme().copyWith(
|
|
primaryTextTheme: const TextTheme().copyWith(
|
|
- bodyText2: const TextStyle(color: Colors.yellow),
|
|
|
|
- bodyText1: const TextStyle(color: Colors.orange),
|
|
|
|
|
|
+ bodyMedium: const TextStyle(color: Colors.yellow),
|
|
|
|
+ bodyLarge: const TextStyle(color: Colors.orange),
|
|
),
|
|
),
|
|
cardColor: const Color.fromRGBO(250, 250, 250, 1.0),
|
|
cardColor: const Color.fromRGBO(250, 250, 250, 1.0),
|
|
dialogTheme: const DialogTheme().copyWith(
|
|
dialogTheme: const DialogTheme().copyWith(
|
|
@@ -78,7 +72,27 @@ final lightThemeData = ThemeData(
|
|
? const Color.fromRGBO(255, 255, 255, 1)
|
|
? const Color.fromRGBO(255, 255, 255, 1)
|
|
: const Color.fromRGBO(0, 0, 0, 1);
|
|
: const Color.fromRGBO(0, 0, 0, 1);
|
|
}),
|
|
}),
|
|
- ),
|
|
|
|
|
|
+ ), radioTheme: RadioThemeData(
|
|
|
|
+ fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ ), switchTheme: SwitchThemeData(
|
|
|
|
+ thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ ), colorScheme: const ColorScheme.light(
|
|
|
|
+ primary: Colors.black,
|
|
|
|
+ secondary: Color.fromARGB(255, 163, 163, 163),
|
|
|
|
+ ).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)),
|
|
);
|
|
);
|
|
|
|
|
|
final darkThemeData = ThemeData(
|
|
final darkThemeData = ThemeData(
|
|
@@ -89,12 +103,10 @@ final darkThemeData = ThemeData(
|
|
primaryIconTheme:
|
|
primaryIconTheme:
|
|
const IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
|
const IconThemeData(color: Colors.red, opacity: 1.0, size: 50.0),
|
|
hintColor: const Color.fromRGBO(158, 158, 158, 1),
|
|
hintColor: const Color.fromRGBO(158, 158, 158, 1),
|
|
- colorScheme: const ColorScheme.dark(primary: Colors.white),
|
|
|
|
buttonTheme: const ButtonThemeData().copyWith(
|
|
buttonTheme: const ButtonThemeData().copyWith(
|
|
buttonColor: const Color.fromRGBO(45, 194, 98, 1.0),
|
|
buttonColor: const Color.fromRGBO(45, 194, 98, 1.0),
|
|
),
|
|
),
|
|
textTheme: _buildTextTheme(const Color.fromRGBO(255, 255, 255, 1)),
|
|
textTheme: _buildTextTheme(const Color.fromRGBO(255, 255, 255, 1)),
|
|
- toggleableActiveColor: const Color.fromRGBO(102, 187, 106, 1),
|
|
|
|
outlinedButtonTheme: buildOutlinedButtonThemeData(
|
|
outlinedButtonTheme: buildOutlinedButtonThemeData(
|
|
bgDisabled: const Color.fromRGBO(158, 158, 158, 1),
|
|
bgDisabled: const Color.fromRGBO(158, 158, 158, 1),
|
|
bgEnabled: const Color.fromRGBO(255, 255, 255, 1),
|
|
bgEnabled: const Color.fromRGBO(255, 255, 255, 1),
|
|
@@ -106,7 +118,6 @@ final darkThemeData = ThemeData(
|
|
primary: const Color.fromRGBO(255, 255, 255, 1),
|
|
primary: const Color.fromRGBO(255, 255, 255, 1),
|
|
),
|
|
),
|
|
scaffoldBackgroundColor: const Color.fromRGBO(0, 0, 0, 1),
|
|
scaffoldBackgroundColor: const Color.fromRGBO(0, 0, 0, 1),
|
|
- backgroundColor: const Color.fromRGBO(0, 0, 0, 1),
|
|
|
|
appBarTheme: const AppBarTheme().copyWith(
|
|
appBarTheme: const AppBarTheme().copyWith(
|
|
color: Colors.black,
|
|
color: Colors.black,
|
|
elevation: 0,
|
|
elevation: 0,
|
|
@@ -153,59 +164,76 @@ final darkThemeData = ThemeData(
|
|
return const Color.fromRGBO(158, 158, 158, 1);
|
|
return const Color.fromRGBO(158, 158, 158, 1);
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
- ),
|
|
|
|
|
|
+ ), radioTheme: RadioThemeData(
|
|
|
|
+ fillColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ ), switchTheme: SwitchThemeData(
|
|
|
|
+ thumbColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ trackColor: MaterialStateProperty.resolveWith<Color?>((Set<MaterialState> states) {
|
|
|
|
+ if (states.contains(MaterialState.disabled)) { return null; }
|
|
|
|
+ if (states.contains(MaterialState.selected)) { return const Color.fromRGBO(102, 187, 106, 1); }
|
|
|
|
+ return null;
|
|
|
|
+ }),
|
|
|
|
+ ), colorScheme: const ColorScheme.dark(primary: Colors.white).copyWith(background: const Color.fromRGBO(0, 0, 0, 1)),
|
|
);
|
|
);
|
|
|
|
|
|
TextTheme _buildTextTheme(Color textColor) {
|
|
TextTheme _buildTextTheme(Color textColor) {
|
|
return const TextTheme().copyWith(
|
|
return const TextTheme().copyWith(
|
|
- headline4: TextStyle(
|
|
|
|
|
|
+ headlineMedium: TextStyle(
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 32,
|
|
fontSize: 32,
|
|
fontWeight: FontWeight.w600,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
),
|
|
),
|
|
- headline5: TextStyle(
|
|
|
|
|
|
+ headlineSmall: TextStyle(
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 24,
|
|
fontSize: 24,
|
|
fontWeight: FontWeight.w600,
|
|
fontWeight: FontWeight.w600,
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
),
|
|
),
|
|
- headline6: TextStyle(
|
|
|
|
|
|
+ titleLarge: TextStyle(
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 18,
|
|
fontSize: 18,
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
fontWeight: FontWeight.w600,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
- subtitle1: TextStyle(
|
|
|
|
|
|
+ titleMedium: TextStyle(
|
|
color: textColor,
|
|
color: textColor,
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
fontSize: 16,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
- subtitle2: TextStyle(
|
|
|
|
|
|
+ titleSmall: TextStyle(
|
|
color: textColor,
|
|
color: textColor,
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
fontSize: 14,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
- bodyText1: TextStyle(
|
|
|
|
|
|
+ bodyLarge: TextStyle(
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 16,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
- bodyText2: TextStyle(
|
|
|
|
|
|
+ bodyMedium: TextStyle(
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 14,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
- caption: TextStyle(
|
|
|
|
|
|
+ bodySmall: TextStyle(
|
|
color: textColor.withOpacity(0.4),
|
|
color: textColor.withOpacity(0.4),
|
|
fontSize: 10,
|
|
fontSize: 10,
|
|
fontWeight: FontWeight.w500,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
- overline: TextStyle(
|
|
|
|
|
|
+ labelSmall: TextStyle(
|
|
fontFamily: 'Inter',
|
|
fontFamily: 'Inter',
|
|
color: textColor,
|
|
color: textColor,
|
|
fontSize: 14,
|
|
fontSize: 14,
|
|
@@ -408,9 +436,7 @@ ElevatedButtonThemeData buildElevatedButtonThemeData({
|
|
}) {
|
|
}) {
|
|
return ElevatedButtonThemeData(
|
|
return ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
style: ElevatedButton.styleFrom(
|
|
- elevation: elevation,
|
|
|
|
- onPrimary: onPrimary,
|
|
|
|
- primary: primary,
|
|
|
|
|
|
+ foregroundColor: onPrimary, backgroundColor: primary, elevation: elevation,
|
|
alignment: Alignment.center,
|
|
alignment: Alignment.center,
|
|
textStyle: const TextStyle(
|
|
textStyle: const TextStyle(
|
|
fontWeight: FontWeight.w600,
|
|
fontWeight: FontWeight.w600,
|