toMap method

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

Implementation

@override
Map<String, dynamic> toMap() {
  var json = super.toMap();
  json.addAll({
    'trackedBrush': _trackedBrush.toMap(),
    'aimedBrush': _aimedBrush.toMap(),
    'selectingBrush': _selectingBrush.toMap(),
    'selectedBrush': _selectedBrush.toMap(),
    'shouldShowHints': _shouldShowHints,
    'shouldShowScanAreaGuides': _shouldShowScanAreaGuides,
    'viewfinder': _viewfinder.toMap(),
    'style': style.toString(),
    'frozenBackgroundColor': _frozenBackgroundColor.jsonValue,
  });
  if (_textForSelectOrDoubleTapToFreezeHint != null) {
    json['textForSelectOrDoubleTapToFreezeHint'] = _textForSelectOrDoubleTapToFreezeHint;
  }
  if (_textForTapToSelectHint != null) {
    json['textForTapToSelectHint'] = _textForTapToSelectHint;
  }
  if (_textForDoubleTapToUnfreezeHint != null) {
    json['textForDoubleTapToUnfreezeHint'] = _textForDoubleTapToUnfreezeHint;
  }
  if (_textForTapAnywhereToSelectHint != null) {
    json['textForTapAnywhereToSelectHint'] = _textForTapAnywhereToSelectHint;
  }
  if (_textForAimToSelectAutoHint != null) {
    json['textForAimToSelectAutoHint'] = _textForAimToSelectAutoHint;
  }
  return json;
}