removeInstance method
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();
}
}