18 lines
520 B
Dart
18 lines
520 B
Dart
import 'package:ef/ef.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:vbvs_app/model/CustomThemeColor.dart';
|
|
|
|
class ThemeController extends GetControllerEx {
|
|
//todo 数据库查询的颜色等于这个
|
|
CustomThemeColor currentColor = CustomThemeColor.light;
|
|
ThemeData currentTheme = ThemeData();
|
|
|
|
void changeTheme(CustomThemeColor color) {
|
|
currentColor = color;
|
|
currentTheme = ThemeData(
|
|
primaryColor: color.sc1,
|
|
scaffoldBackgroundColor: color.sc2,
|
|
);
|
|
update();
|
|
}
|
|
} |