isCustomList function

bool isCustomList(
  1. String type
)

Returns true if the type is List<non-primitive,non-dynamic> or nullable variant.

Implementation

bool isCustomList(String type) {
  final base = baseType(type);
  if (!base.startsWith('List<')) return false;
  final inner = base.substring(5, base.length - 1);
  return !primitives.contains(inner) && inner != 'dynamic';
}