mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
17 lines
347 B
Dart
17 lines
347 B
Dart
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class DataUtil {
|
|
static SharedPreferences? _prefs;
|
|
|
|
static Future<SharedPreferences> getInstance() async {
|
|
if (_prefs == null) {
|
|
_prefs = await SharedPreferences.getInstance();
|
|
}
|
|
return _prefs!;
|
|
}
|
|
}
|
|
|
|
class DataKey {
|
|
static final String SETTING = "setting";
|
|
}
|