getStoredCredentials method

Future<({String password, String username})?> getStoredCredentials()

Returns the stored portal credentials, or null if either value is missing.

Implementation

Future<({String username, String password})?> getStoredCredentials() async {
  final username = await _secureStorage.read(key: _usernameKey);
  final password = await _secureStorage.read(key: _passwordKey);
  if (username == null || password == null) return null;
  return (username: username, password: password);
}