checkTypesKnown method

void checkTypesKnown(
  1. Set<String> names
)

Implementation

void checkTypesKnown(final Set<String> names) {
  if (generics.isEmpty) {
    if (!TypeChecker.isKnownDartType(baseType) && !names.contains(baseType)) {
      throw Exception(
          'Could not generate all models. `$baseType` is not added to the config file');
    }
  } else if (!TypeChecker.isKnownDartCollectionType(baseType)) {
    throw Exception(
        'Could not generate all models. `$baseType` is currently not supported as generic base type');
  } else {
    for (final e in generics) {
      e.checkTypesKnown(names);
    }
  }
}