Add SecureStorageController
This commit is contained in:
parent
4798ae0554
commit
c3376bf780
10 changed files with 136 additions and 188 deletions
|
|
@ -40,7 +40,7 @@ class ClientController extends AsyncNotifier<Client> {
|
|||
identifier: AuthenticationUserIdentifier(user: username),
|
||||
password: password,
|
||||
);
|
||||
//TODO: refresh
|
||||
ref.invalidateSelf();
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
|
|
|
|||
12
lib/controllers/secure_storage_controller.dart
Normal file
12
lib/controllers/secure_storage_controller.dart
Normal 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,
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue