removeInstance method

Future<void> removeInstance(
  1. String id
)

Removes and destroys the instance with the given id. Stops keyword detection before destruction.

Implementation

Future<void> removeInstance(String id) async {
  final instance = _instances.remove(id);
  if (instance != null) {
    await instance.stopKeywordDetection();
    await instance.destroyInstance();
  }
}