Add SecureStorageController

This commit is contained in:
Henry Hiles 2025-11-17 21:43:46 -05:00
commit c3376bf780
No known key found for this signature in database
10 changed files with 136 additions and 188 deletions

View file

@ -40,7 +40,7 @@ class ClientController extends AsyncNotifier<Client> {
identifier: AuthenticationUserIdentifier(user: username),
password: password,
);
//TODO: refresh
ref.invalidateSelf();
return true;
} catch (_) {
return false;

View file

@ -0,0 +1,12 @@
import "package:matrix/matrix.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:simple_secure_storage/simple_secure_storage.dart";
class SecureStorageController extends AsyncNotifier<void> {
@override
Future<void> build() => SimpleSecureStorage.initialize();
static final provider = AsyncNotifierProvider<SecureStorageController, void>(
SecureStorageController.new,
);
}