toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final _json = <String, dynamic>{};
  if (percentage != null) {
    _json[r'percentage'] = percentage;
  }
  if (error != null) {
    _json[r'error'] = error;
  }
  return _json;
}