get<C extends Collection<Model> > static method
Implementation
static C get<C extends Collection>({String? id, Type? modelType}) {
if (id != null) {
return _collections[id];
}
if (modelType != null) {
for (dynamic c in _collections.values) {
if (c.getModelType() == modelType) {
return c;
}
}
}
for (dynamic c in _collections.values) {
if (c.runtimeType == C) {
return c;
}
}
dynamic c = BaseCollection();
return c;
}