isCollectionType<T> static method

bool isCollectionType<T>([
  1. Type? type
])

Returns true if type is a collection (List, Iterable, Map or Set).

Implementation

static bool isCollectionType<T>([Type? type]) {
  type ??= T;
  return TypeInfo.from(type).isCollection;
}