setConfidenceThreshold method

Future<void> setConfidenceThreshold(
  1. double threshold
)

Implementation

Future<void> setConfidenceThreshold(double threshold) async {
  _confidenceThreshold = threshold.clamp(0.0, 1.0);
  if (_methodChannel != null) {
    try {
      await _methodChannel!.invokeMethod('setConfidenceThreshold', {
        'threshold': _confidenceThreshold,
      });
    } catch (e) {
      logInfo('Error setting confidence threshold: $e');
    }
  }
}