init static method

Future<void> init()

Implementation

static Future<void> init() async {
  _prefs = await SharedPreferences.getInstance();
  // Preload the token from the Keychain/Keystore into the sync cache.
  try {
    _tokenCache = await _secure.read(key: _kSecureToken);
  } catch (_) {
    _tokenCache = null; // secure storage unavailable — fail closed (no token)
  }
}