storage property
FlutterSecureStorage
get
storage
获取安全存储实例
根据平台区分不同参数,iOS/Android自动适配。
Implementation
static FlutterSecureStorage get storage {
var storage = const FlutterSecureStorage();
if (Platform.isAndroid) {
storage = const FlutterSecureStorage(
aOptions: AndroidOptions(encryptedSharedPreferences: true),
);
}
return storage;
}