init method

void init(
  1. MethodChannel methodChannel,
  2. int viewId
)

Implementation

void init(MethodChannel methodChannel, int viewId) {
  _methodChannel = methodChannel;
  _viewId = viewId;
  _invoke('setThresholds', {
    'confidenceThreshold': _confidenceThreshold,
    'iouThreshold': _iouThreshold,
    'numItemsThreshold': _numItemsThreshold,
  });
  // Re-apply state set before the platform view attached, which would otherwise be silently dropped.
  if (!_showOverlays) {
    _invoke('setShowOverlays', {'visible': false});
  }
}