getType<T> static method

String getType<T>([
  1. String? type
])

Implementation

static String getType<T>([String? type]) {
  if (T == dynamic && type == null) {
    throw UnsupportedError('Please supply a type');
  }
  type ??= T.toString();
  type = type.decapitalize();
  return type.pluralize();
}