get<T extends Model> static method

T? get<T extends Model>([
  1. String? id
])

Returns the model of given type from the store. Returns null if no such model exists. Use the id parameter to get an instance of id model. See Store.add for details.

Implementation

static T? get<T extends Model>([String? id]) {
  final key = id ?? T;
  return _EagerModelStore.get(key) ?? _LazyModelStore.get(key);
}