authorization property

String get authorization

Authorization parameter

Implementation

String get authorization {
  // If api key is provided, use it.
  if (apiKey != null) {
    return apiKey!;

    // If password is provided, covert it to md5.
  } else if (password != null) {
    return md5.convert(utf8.encode(password!)).toString();
  }

  // Otherwise, throw an error.
  throw ArgumentError('Either password or apiKey must be provided.');
}