toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var breachTime = this.breachTime;
  var breached = this.breached;
  var elapsedTime = this.elapsedTime;
  var goalDuration = this.goalDuration;
  var remainingTime = this.remainingTime;
  var startTime = this.startTime;
  var stopTime = this.stopTime;

  final json = <String, Object?>{};
  if (breachTime != null) {
    json[r'breachTime'] = breachTime.toJson();
  }
  json[r'breached'] = breached;
  if (elapsedTime != null) {
    json[r'elapsedTime'] = elapsedTime.toJson();
  }
  if (goalDuration != null) {
    json[r'goalDuration'] = goalDuration.toJson();
  }
  if (remainingTime != null) {
    json[r'remainingTime'] = remainingTime.toJson();
  }
  if (startTime != null) {
    json[r'startTime'] = startTime.toJson();
  }
  if (stopTime != null) {
    json[r'stopTime'] = stopTime.toJson();
  }
  return json;
}