nc-photos/app/lib/entity/pref_util.dart
2023-07-18 00:44:30 +08:00

9 lines
366 B
Dart

import 'package:nc_photos/account.dart';
import 'package:nc_photos/entity/pref.dart';
import 'package:nc_photos/entity/pref/provider/universal_storage.dart';
Future<AccountPref> loadAccountPref(Account account) async {
final provider = PrefUniversalStorageProvider("accounts/${account.id}/pref");
await provider.init();
return AccountPref.scoped(provider);
}