Optimized primary color fetching method

This commit is contained in:
LollipopKit
2021-10-26 17:27:02 +08:00
parent e1e816e49d
commit 321af571d6
3 changed files with 31 additions and 23 deletions

View File

@@ -3,7 +3,7 @@ import 'package:toolbox/core/utils.dart';
import 'package:toolbox/data/store/setting.dart';
import 'package:toolbox/locator.dart';
Color primaryColor = Color(locator<SettingStore>().primaryColor.fetch()!);
Color get primaryColor => Color(locator<SettingStore>().primaryColor.fetch()!);
class DynamicColor {
/// 白天模式显示的颜色