Returns true if type is a collection (List, Iterable, Map or Set).
true
type
static bool isCollectionType<T>([Type? type]) { type ??= T; return TypeInfo.from(type).isCollection; }