validateAddressArgs<T> static method

T validateAddressArgs<T>(
  1. Map<String, dynamic> kwargs,
  2. String key
)

validate argrument by key

Implementation

static T validateAddressArgs<T>(Map<String, dynamic> kwargs, String key) {
  if (!kwargs.containsKey(key) || kwargs[key] is! T) {
    throw AddressConverterException(
        'Invalid or Missing required parameters: $key as type $T');
  }
  return kwargs[key] as T;
}