Credentials.fromMap constructor

Credentials.fromMap(
  1. Map<String, String> parameters
)

Implementation

factory Credentials.fromMap(Map<String, String> parameters) {
  if (!parameters.containsKey('oauth_token')) {
    throw ArgumentError("params doesn't have a key 'oauth_token'");
  }
  if (!parameters.containsKey('oauth_token_secret')) {
    throw ArgumentError("params doesn't have a key 'oauth_token_secret'");
  }
  return Credentials(
      parameters['oauth_token']!, parameters['oauth_token_secret']!);
}