toMap method

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

Implementation

@override
Map<String, dynamic> toMap() {
  var json = <String, dynamic>{
    'type': 'error',
    'barcodeFeedback': {
      'message': _message,
      'visualFeedbackColor': _visualFeedbackColor.jsonValue,
      'resumeCapturingDelay': _resumeCapturingDelay.inSeconds,
      'brush': _brush.toMap(),
    }
  };
  if (_feedback != null) {
    json['barcodeFeedback']['feedback'] = _feedback.toMap();
  }
  return json;
}