fix & opt

fix: cant ping when launch page is ping
fix: button text color not primaryColor
opt: getting primaryColor
This commit is contained in:
lollipopkit
2023-02-01 17:18:46 +08:00
parent 2faea10d61
commit 21ac323ed1
28 changed files with 445 additions and 423 deletions

View File

@@ -0,0 +1,15 @@
import 'package:flutter/widgets.dart';
import '../../../core/utils/ui.dart';
class DynamicColor {
/// 白天模式显示的颜色
Color light;
/// 暗黑模式显示的颜色
Color dark;
DynamicColor(this.light, this.dark);
Color resolve(BuildContext context) => isDarkMode(context) ? dark : light;
}