mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
27 lines
496 B
Dart
27 lines
496 B
Dart
import 'package:PiliPlus/utils/storage_pref.dart';
|
|
|
|
class GlobalData {
|
|
int imgQuality = Pref.picQuality;
|
|
|
|
num? coins;
|
|
|
|
void afterCoin(num coin) {
|
|
if (coins != null) {
|
|
coins = coins! - coin;
|
|
}
|
|
}
|
|
|
|
Set<int> blackMids = Pref.blackMids;
|
|
|
|
bool dynamicsWaterfallFlow = Pref.dynamicsWaterfallFlow;
|
|
|
|
// 私有构造函数
|
|
GlobalData._();
|
|
|
|
// 单例实例
|
|
static final GlobalData _instance = GlobalData._();
|
|
|
|
// 获取全局实例
|
|
factory GlobalData() => _instance;
|
|
}
|