getCredentials method

  1. @override
Future<HttpClientCredentials?> getCredentials()
override

Implementation

@override
Future<HttpClientCredentials?> getCredentials() async {
  var username = await _secureStorage.read(key: 'username');
  if (username == null) return null;
  var password = await _secureStorage.read(key: 'password');
  return HttpClientBasicCredentials(username, password!);
}