spotube/lib/services/kv_store/kv_store.dart
2024-03-08 23:07:55 +06:00

16 lines
567 B
Dart

import 'package:shared_preferences/shared_preferences.dart';
abstract class KVStoreService {
static SharedPreferences? _sharedPreferences;
static SharedPreferences get sharedPreferences => _sharedPreferences!;
static Future<void> initialize() async {
_sharedPreferences = await SharedPreferences.getInstance();
}
static bool get doneGettingStarted =>
sharedPreferences.getBool('doneGettingStarted') ?? false;
static Future<void> setDoneGettingStarted(bool value) async =>
await sharedPreferences.setBool('doneGettingStarted', value);
}