remove<T extends SignalModel> static method

T? remove<T extends SignalModel>([
  1. String? id
])

Removes the model of given type from the store and returns it. It also calls the dispose method of the model. Returns null if no model is found. Use the id parameter to remove an instance of id model. See ModelStore.add for details.

Implementation

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