setFocusSettings method

void setFocusSettings(
  1. FocusSettings focusSettings
)

Implementation

void setFocusSettings(FocusSettings focusSettings) {
  _channel.invokeMethod(
      'configureFocusSettings',
      jsonEncode({
        'shouldDisplayFocusImage': focusSettings.shouldDisplayFocusImage,
        'shouldScanInFocusImageRect':
            focusSettings.shouldScanInFocusImageRect,
        'showDocumentBoundaries': focusSettings.showDocumentBoundaries,
        'documentBoundaryBorderColor':
            focusSettings.documentBoundaryBorderColor,
        'documentBoundaryFillColor': focusSettings.documentBoundaryFillColor,
        'focusImage': focusSettings.focusImage,
        'focusImageRect': {
          'x': focusSettings.focusImageRect.left,
          'y': focusSettings.focusImageRect.top,
          'width': focusSettings.focusImageRect.width,
          'height': focusSettings.focusImageRect.height
        },
        'focusImageTintColor': focusSettings.focusImageTintColor,
        'focusImageHighlightedColor':
            focusSettings.focusImageHighlightedColor,
        'showCodeBoundariesInMultipleScan':
            focusSettings.showCodeBoundariesInMultipleScan,
        'validCodeBoundaryBorderColor':
            focusSettings.validCodeBoundaryBorderColor,
        'validCodeBoundaryBorderWidth':
            focusSettings.validCodeBoundaryBorderWidth,
        'validCodeBoundaryFillColor':
            focusSettings.validCodeBoundaryFillColor,
        'invalidCodeBoundaryBorderColor':
            focusSettings.invalidCodeBoundaryBorderColor,
        'invalidCodeBoundaryBorderWidth':
            focusSettings.invalidCodeBoundaryBorderWidth,
        'invalidCodeBoundaryFillColor':
            focusSettings.invalidCodeBoundaryFillColor
      }));
}