save static method

Future<void> save(
  1. String url,
  2. String anonKey, [
  3. FlutterSecureStorage storage = const FlutterSecureStorage()
])

Persist user-provided credentials to secure storage.

Implementation

static Future<void> save(
  String url,
  String anonKey, [
  FlutterSecureStorage storage = const FlutterSecureStorage(),
]) async {
  await storage.write(key: _urlKey, value: url);
  await storage.write(key: _anonKeyKey, value: anonKey);
  _url = url;
  _anonKey = anonKey;
  _mode = InstanceMode.custom;
}