NativeSecureStorage constructor

NativeSecureStorage({
  1. String? namespace,
  2. String? scope,
})

Provides platform-specific secure storage, typically using the OS's secure keychain or keystore.

On Web, this returns a NativeMemoryStorage instance. No written values will be persisted across page reloads.

Implementation

factory NativeSecureStorage({
  String? namespace,
  String? scope,
}) {
  // Route through [NativeStorage] to ensure de-duplication of instances.
  return NativeStorage(namespace: namespace, scope: scope).secure;
}