toMap method

  1. @override
Map<String, dynamic> toMap()

Implementation

@override
Map<String, dynamic> toMap() {
  return {
    'SparkScanView': {
      'viewSettings': _settings.toMap(),
      'brush': brush.toMap(),
      'shouldShowScanAreaGuides': shouldShowScanAreaGuides,
      'torchButtonVisible': torchButtonVisible,
      'scanningBehaviorButtonVisible': scanningBehaviorButtonVisible,
      'handModeButtonVisible': handModeButtonVisible,
      'stopCapturingText': stopCapturingText,
      'startCapturingText': startCapturingText,
      'resumeCapturingText': resumeCapturingText,
      'scanningCapturingText': scanningCapturingText,
      'captureButtonBackgroundColor': captureButtonBackgroundColor?.jsonValue,
      'captureButtonActiveBackgroundColor': captureButtonActiveBackgroundColor?.jsonValue,
      'toolbarBackgroundColor': toolbarBackgroundColor?.jsonValue,
      'barcodeCountButtonVisible': barcodeCountButtonVisible,
      'barcodeFindButtonVisible': barcodeFindButtonVisible,
      'targetModeButtonVisible': targetModeButtonVisible,
      'toolbarIconActiveTintColor': toolbarIconActiveTintColor?.jsonValue,
      'toolbarIconInactiveTintColor': toolbarIconInactiveTintColor?.jsonValue,
      'soundModeButtonVisible': soundModeButtonVisible,
      'hapticModeButtonVisible': hapticModeButtonVisible,
      'captureButtonTintColor': captureButtonTintColor?.jsonValue,
      'zoomSwitchControlVisible': zoomSwitchControlVisible,
      'targetModeHintText': targetModeHintText,
      'previewSizeControlVisible': previewSizeControlVisible,
      'hasFeedbackDelegate': _feedbackDelegate != null,
      'cameraSwitchButtonVisible': cameraSwitchButtonVisible,
    },
    'SparkScan': _sparkScan.toMap(),
  };
}