mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 21:24:02 +08:00
@@ -1,26 +1,17 @@
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
|
||||
class GlobalData {
|
||||
int imgQuality = Pref.picQuality;
|
||||
abstract final class GlobalData {
|
||||
static int imgQuality = Pref.picQuality;
|
||||
|
||||
num? coins;
|
||||
static num? coins;
|
||||
|
||||
void afterCoin(num coin) {
|
||||
static void afterCoin(num coin) {
|
||||
if (coins != null) {
|
||||
coins = coins! - coin;
|
||||
}
|
||||
}
|
||||
|
||||
Set<int> blackMids = Pref.blackMids;
|
||||
static Set<int> blackMids = Pref.blackMids;
|
||||
|
||||
bool dynamicsWaterfallFlow = Pref.dynamicsWaterfallFlow;
|
||||
|
||||
// 私有构造函数
|
||||
GlobalData._();
|
||||
|
||||
// 单例实例
|
||||
static final GlobalData _instance = GlobalData._();
|
||||
|
||||
// 获取全局实例
|
||||
factory GlobalData() => _instance;
|
||||
static bool dynamicsWaterfallFlow = Pref.dynamicsWaterfallFlow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user