Jisho-Study-Tool/lib/services/preferences.dart

8 lines
282 B
Dart
Raw Normal View History

2022-01-25 20:15:35 +01:00
import 'package:get_it/get_it.dart';
import 'package:shared_preferences/shared_preferences.dart';
Future<void> setupSharedPreferences() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
GetIt.instance.registerSingleton<SharedPreferences>(prefs);
}