95 lines
2.7 KiB
Dart
95 lines
2.7 KiB
Dart
/*class AppThemes {
|
|
static ThemeData getLightTheme(ThemeType type) {
|
|
switch (type) {
|
|
case ThemeType.green:
|
|
return ThemeData(
|
|
brightness: Brightness.light,
|
|
primarySwatch: Colors.green,
|
|
scaffoldBackgroundColor: Colors.white,
|
|
);
|
|
case ThemeType.orange:
|
|
return ThemeData(
|
|
brightness: Brightness.light,
|
|
primarySwatch: Colors.orange,
|
|
scaffoldBackgroundColor: Colors.white,
|
|
);
|
|
case ThemeType.blue:
|
|
return ThemeData(
|
|
brightness: Brightness.light,
|
|
primarySwatch: Colors.blue,
|
|
scaffoldBackgroundColor: Colors.white,
|
|
);
|
|
case ThemeType.violet:
|
|
default:
|
|
return ThemeData(
|
|
brightness: Brightness.light,
|
|
primarySwatch: Colors.deepPurple,
|
|
scaffoldBackgroundColor: Colors.white,
|
|
);
|
|
}
|
|
}
|
|
|
|
static ThemeData getDarkTheme(ThemeType type) {
|
|
switch (type) {
|
|
case ThemeType.green:
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
primarySwatch: Colors.green,
|
|
scaffoldBackgroundColor: Colors.black,
|
|
);
|
|
case ThemeType.orange:
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
primarySwatch: Colors.orange,
|
|
scaffoldBackgroundColor: Colors.black,
|
|
);
|
|
case ThemeType.blue:
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
primarySwatch: Colors.blue,
|
|
scaffoldBackgroundColor: Colors.black,
|
|
);
|
|
case ThemeType.violet:
|
|
default:
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
primarySwatch: Colors.deepPurple,
|
|
scaffoldBackgroundColor: Colors.black,
|
|
);
|
|
}
|
|
}
|
|
}*/
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'theme_type.dart';
|
|
|
|
class AppThemes {
|
|
static ThemeData getLightTheme(ThemeType type) {
|
|
switch (type) {
|
|
case ThemeType.green:
|
|
return ThemeData(primarySwatch: Colors.green);
|
|
case ThemeType.orange:
|
|
return ThemeData(primarySwatch: Colors.orange);
|
|
case ThemeType.blue:
|
|
return ThemeData(primarySwatch: Colors.blue);
|
|
case ThemeType.violet:
|
|
default:
|
|
return ThemeData(primarySwatch: Colors.deepPurple);
|
|
}
|
|
}
|
|
|
|
static ThemeData getDarkTheme(ThemeType type) {
|
|
switch (type) {
|
|
case ThemeType.green:
|
|
return ThemeData.dark().copyWith(primaryColor: Colors.green);
|
|
case ThemeType.orange:
|
|
return ThemeData.dark().copyWith(primaryColor: Colors.orange);
|
|
case ThemeType.blue:
|
|
return ThemeData.dark().copyWith(primaryColor: Colors.blue);
|
|
case ThemeType.violet:
|
|
default:
|
|
return ThemeData.dark().copyWith(primaryColor: Colors.deepPurple);
|
|
}
|
|
}
|
|
} |