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 ArgumentException('Missing required parameters: $key');
  }
  return kwargs[key] as T;
}