toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var set = this.set;
  var failed = this.failed;
  var percentage = this.percentage;
  var message = this.message;
  var state = this.state;
  var success = this.success;

  final json = <String, Object?>{};
  json[r'set'] = set;
  json[r'failed'] = failed.map((i) => i.toJson()).toList();
  json[r'percentage'] = percentage;
  if (message != null) {
    json[r'message'] = message;
  }
  if (state != null) {
    json[r'state'] = state.toJson();
  }
  json[r'success'] = success;
  return json;
}