UseModel class

A class to manage multiple KeyWordFlutterPC instances, providing convenient APIs for creating, starting, stopping, and removing them.

Each instance is linked to an InstanceConfig, which provides the model name, threshold, buffer count, etc.

Constructors

UseModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
isListening bool
Indicates whether the detection engines (for all instances) are currently in “listening” state.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInstance(InstanceConfig config, DetectionCallback callback) Future<void>
Adds a new KeyWordFlutterPC instance from config, sets up the DetectionCallback, and starts keyword detection.
loadModel(List<InstanceConfig> configs, DetectionCallback callback) Future<void>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeInstance(String id) Future<void>
Removes and destroys the instance with the given id. Stops keyword detection before destruction.
setKeywordDetectionLicense(String licenseKey) Future<void>
Sets the global gLicenseKey used by the detection engine.
startListening() Future<void>
Starts keyword detection for all known KeyWordFlutterPC instances.
stopListening() Future<void>
Stops keyword detection for all known KeyWordFlutterPC instances.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited