mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
fix & opt
fix: cant ping when launch page is ping fix: button text color not primaryColor opt: getting primaryColor
This commit is contained in:
15
lib/data/model/app/dynamic_color.dart
Normal file
15
lib/data/model/app/dynamic_color.dart
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user