Changed some formatting issues
This commit is contained in:
@@ -3,7 +3,6 @@ import 'theme_type.dart';
|
|||||||
|
|
||||||
class AppThemes {
|
class AppThemes {
|
||||||
static ThemeData getLightTheme(ThemeType type) {
|
static ThemeData getLightTheme(ThemeType type) {
|
||||||
// Define a seed color based on the theme type
|
|
||||||
final Color seedColor;
|
final Color seedColor;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ThemeType.green:
|
case ThemeType.green:
|
||||||
@@ -16,18 +15,15 @@ case ThemeType.blue:
|
|||||||
seedColor = Colors.blue;
|
seedColor = Colors.blue;
|
||||||
break;
|
break;
|
||||||
case ThemeType.violet:
|
case ThemeType.violet:
|
||||||
default:
|
|
||||||
seedColor = Colors.deepPurple;
|
seedColor = Colors.deepPurple;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a ColorScheme from the seed color
|
|
||||||
final colorScheme = ColorScheme.fromSeed(
|
final colorScheme = ColorScheme.fromSeed(
|
||||||
seedColor: seedColor,
|
seedColor: seedColor,
|
||||||
brightness: Brightness.light, // Explicitly set for a light theme
|
brightness: Brightness.light, // Explicitly set for a light theme
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create the ThemeData from the ColorScheme
|
|
||||||
return ThemeData.from(
|
return ThemeData.from(
|
||||||
colorScheme: colorScheme,
|
colorScheme: colorScheme,
|
||||||
useMaterial3: true, // Recommended for modern Flutter apps
|
useMaterial3: true, // Recommended for modern Flutter apps
|
||||||
@@ -39,3 +35,4 @@ backgroundColor: colorScheme.surface,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user