loadModel method

Future<void> loadModel(
  1. List<InstanceConfig> configs,
  2. DetectionCallback callback
)

Loads multiple InstanceConfig items into this model, creating and starting new instances for each config. Uses the provided callback as the detection callback for all instances.

Implementation

Future<void> loadModel(
  List<InstanceConfig> configs,
  DetectionCallback callback,
) async {
  _configs.clear();
  _configs.addAll(configs);

  for (final config in configs) {
    await addInstance(config, callback);
  }
}