add<T extends SignalModel> static method

void add<T extends SignalModel>(
  1. ModelBuilder<T> modelBuilder, [
  2. String? id
])

Adds a model to the Store. No model is added if a model of same type already exists. Model is added lazily that is no model is created until it is accessed for the first time. To add a model when another one of same type already exists, provide a unique string id using the optional id parameter.

Implementation

static void add<T extends SignalModel>(ModelBuilder<T> modelBuilder,
    [String? id]) {
  final key = id ?? T;
  _LazyModelStore.add(modelBuilder, key);
}