toMap method

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

Implementation

@override
Map<String, dynamic> toMap() {
  var json = <String, dynamic>{
    'View': {
      'shouldShowUserGuidanceView': shouldShowUserGuidanceView,
      'shouldShowHints': shouldShowHints,
      'shouldShowCarousel': shouldShowCarousel,
      'shouldShowPauseButton': shouldShowPauseButton,
      'shouldShowFinishButton': shouldShowFinishButton,
      'shouldShowProgressBar': shouldShowProgressBar,
      'shouldShowTorchControl': shouldShowTorchControl,
      'torchControlPosition': torchControlPosition.toString(),
      'textForCollapseCardsButton': textForCollapseCardsButton,
      'textForAllItemsFoundSuccessfullyHint': textForAllItemsFoundSuccessfullyHint,
      'textForPointAtBarcodesToSearchHint': textForPointAtBarcodesToSearchHint,
      'textForMoveCloserToBarcodesHint': textForMoveCloserToBarcodesHint,
      'textForTapShutterToPauseScreenHint': textForTapShutterToPauseScreenHint,
      'textForTapShutterToResumeSearchHint': textForTapShutterToResumeSearchHint,
      'startSearching': _startSearching,
      'textForItemListUpdatedHint': textForItemListUpdatedHint,
      'textForItemListUpdatedWhenPausedHint': textForItemListUpdatedWhenPausedHint,
    },
    'BarcodeFind': _barcodeFind.toMap()
  };

  if (_barcodeFindViewSettings != null) {
    json['View']['viewSettings'] = _barcodeFindViewSettings.toMap();
  }

  if (_cameraSettings != null) {
    json['View']['cameraSettings'] = _cameraSettings.toMap();
  }

  return json;
}