refactoring
This commit is contained in:
@@ -9,18 +9,18 @@ part 'providers.g.dart';
|
||||
|
||||
const _authKey = 'pb_auth';
|
||||
|
||||
@Riverpod()
|
||||
Stream<double> iconCacheSizeMegabytes(Ref ref) {
|
||||
final repository = ref.watch(userDatabaseProvider);
|
||||
return repository.cacheDao.iconCacheSize().watchSingle();
|
||||
}
|
||||
|
||||
@Riverpod()
|
||||
Future<String?> _storedAuthData(Ref ref) {
|
||||
const secureStorage = FlutterSecureStorage();
|
||||
return secureStorage.read(key: _authKey);
|
||||
}
|
||||
|
||||
@Riverpod()
|
||||
Stream<double> iconCacheSizeMegabytes(Ref ref) {
|
||||
final repository = ref.watch(userDatabaseProvider);
|
||||
return repository.cacheDao.getIconCacheSize().watchSingle();
|
||||
}
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
AsyncAuthStore authStore(Ref ref) {
|
||||
const secureStorage = FlutterSecureStorage();
|
||||
|
||||
Reference in New Issue
Block a user