Skip to content

Commit 12d92c9

Browse files
committed
fix(app): add method to check if strongbox is supported
1 parent 4aa2c13 commit 12d92c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flutter_secure_storage/lib/flutter_secure_storage.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,14 @@ class FlutterSecureStorage {
344344
});
345345
}
346346

347+
Future<bool> isStrongBoxSupported() async {
348+
if (defaultTargetPlatform == TargetPlatform.android) {
349+
return await _platform.isStrongBoxSupported();
350+
} else {
351+
throw UnsupportedError(_unsupportedPlatform);
352+
}
353+
}
354+
347355
/// Select correct options based on current platform
348356
Map<String, String> _selectOptions(
349357
AppleOptions? iOptions,

0 commit comments

Comments
 (0)