isListOfModelType function

bool isListOfModelType(
  1. InterfaceType t
)

Determines if a DartType is a List with the first type argument being a Model.

Implementation

bool isListOfModelType(InterfaceType t) {
  return const TypeChecker.fromRuntime(List).isAssignableFromType(t) &&
      t.typeArguments.length == 1 &&
      isModelClass(t.typeArguments[0]);
}