mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
chore: Follow up fix secure storage
This commit is contained in:
parent
44446db5be
commit
b473fa3ca4
@ -77,28 +77,21 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
return L10n.of(context)!.storeSecurlyOnThisDevice;
|
return L10n.of(context)!.storeSecurlyOnThisDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const secureStorage = FlutterSecureStorage(
|
|
||||||
aOptions: AndroidOptions(
|
|
||||||
encryptedSharedPreferences: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
_createBootstrap(widget.wipe);
|
_createBootstrap(widget.wipe);
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _createBootstrap(bool wipe) {
|
void _createBootstrap(bool wipe) async {
|
||||||
_wipe = wipe;
|
_wipe = wipe;
|
||||||
titleText = null;
|
titleText = null;
|
||||||
_recoveryKeyStored = false;
|
_recoveryKeyStored = false;
|
||||||
bootstrap =
|
bootstrap =
|
||||||
widget.client.encryption!.bootstrap(onUpdate: () => setState(() {}));
|
widget.client.encryption!.bootstrap(onUpdate: () => setState(() {}));
|
||||||
secureStorage.read(key: _secureStorageKey).then((key) {
|
final key = await const FlutterSecureStorage().read(key: _secureStorageKey);
|
||||||
if (key == null) return;
|
if (key == null) return;
|
||||||
_recoveryKeyTextEditingController.text = key;
|
_recoveryKeyTextEditingController.text = key;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -188,7 +181,7 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
|
|||||||
(_recoveryKeyCopied || _storeInSecureStorage == true)
|
(_recoveryKeyCopied || _storeInSecureStorage == true)
|
||||||
? () {
|
? () {
|
||||||
if (_storeInSecureStorage == true) {
|
if (_storeInSecureStorage == true) {
|
||||||
secureStorage.write(
|
const FlutterSecureStorage().write(
|
||||||
key: _secureStorageKey,
|
key: _secureStorageKey,
|
||||||
value: key,
|
value: key,
|
||||||
);
|
);
|
||||||
|
@ -654,21 +654,21 @@ packages:
|
|||||||
name: flutter_secure_storage
|
name: flutter_secure_storage
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.2"
|
version: "5.1.0"
|
||||||
flutter_secure_storage_linux:
|
flutter_secure_storage_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_secure_storage_linux
|
name: flutter_secure_storage_linux
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
flutter_secure_storage_macos:
|
flutter_secure_storage_macos:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_secure_storage_macos
|
name: flutter_secure_storage_macos
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
flutter_secure_storage_platform_interface:
|
flutter_secure_storage_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -43,7 +43,7 @@ dependencies:
|
|||||||
flutter_olm: ^1.2.0
|
flutter_olm: ^1.2.0
|
||||||
flutter_openssl_crypto: ^0.1.0
|
flutter_openssl_crypto: ^0.1.0
|
||||||
flutter_ringtone_player: ^3.1.1
|
flutter_ringtone_player: ^3.1.1
|
||||||
flutter_secure_storage: ^5.0.2
|
flutter_secure_storage: ^5.1.0
|
||||||
flutter_slidable: ^1.2.0
|
flutter_slidable: ^1.2.0
|
||||||
flutter_svg: ^0.22.0
|
flutter_svg: ^0.22.0
|
||||||
flutter_typeahead: ^4.0.0
|
flutter_typeahead: ^4.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user