mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 11:13:46 +08:00
移动颜色配置到 AppGlobalUIModel
This commit is contained in:
parent
2d70fca71b
commit
6494c7971e
@ -43,10 +43,6 @@ class AppConf {
|
|||||||
|
|
||||||
static late final WindowsDeviceInfo windowsDeviceInfo;
|
static late final WindowsDeviceInfo windowsDeviceInfo;
|
||||||
|
|
||||||
static String colorBackground = "#132431";
|
|
||||||
static String colorMenu = "#122D42";
|
|
||||||
static String colorMica = "#0A3142";
|
|
||||||
|
|
||||||
static const isMSE =
|
static const isMSE =
|
||||||
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
String.fromEnvironment("MSE", defaultValue: "false") == "true";
|
||||||
|
|
||||||
|
@ -16,6 +16,11 @@ final globalUIModel = AppGlobalUIModel();
|
|||||||
final globalUIModelProvider = ChangeNotifierProvider((ref) => globalUIModel);
|
final globalUIModelProvider = ChangeNotifierProvider((ref) => globalUIModel);
|
||||||
|
|
||||||
class AppGlobalUIModel extends BaseUIModel {
|
class AppGlobalUIModel extends BaseUIModel {
|
||||||
|
|
||||||
|
String colorBackground = "#132431";
|
||||||
|
String colorMenu = "#122D42";
|
||||||
|
String colorMica = "#0A3142";
|
||||||
|
|
||||||
Future<bool> checkUpdate(BuildContext context, {bool init = true}) async {
|
Future<bool> checkUpdate(BuildContext context, {bool init = true}) async {
|
||||||
if (AppConf.isMSE) return true;
|
if (AppConf.isMSE) return true;
|
||||||
if (!init) {
|
if (!init) {
|
||||||
|
@ -36,10 +36,11 @@ class AppUI extends BaseUI {
|
|||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
fontFamily: "SourceHanSansCN-Regular",
|
fontFamily: "SourceHanSansCN-Regular",
|
||||||
navigationPaneTheme: NavigationPaneThemeData(
|
navigationPaneTheme: NavigationPaneThemeData(
|
||||||
backgroundColor: HexColor(AppConf.colorBackground).withOpacity(.75),
|
backgroundColor:
|
||||||
|
HexColor(globalUIModel.colorBackground).withOpacity(.75),
|
||||||
),
|
),
|
||||||
menuColor: HexColor(AppConf.colorMenu).withOpacity(.95),
|
menuColor: HexColor(globalUIModel.colorMenu).withOpacity(.95),
|
||||||
micaBackgroundColor: HexColor(AppConf.colorMica),
|
micaBackgroundColor: HexColor(globalUIModel.colorMica),
|
||||||
),
|
),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
home: BaseUIContainer(
|
home: BaseUIContainer(
|
||||||
|
Loading…
Reference in New Issue
Block a user