toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'location'] = this.location;
  json[r'sunElevation'] = this.sunElevation;
  json[r'sunAzimuth'] = this.sunAzimuth;
  json[r'dayTime'] = this.dayTime;
  if (this.dawnAstronomical != null) {
    json[r'dawnAstronomical'] = this.dawnAstronomical;
  } else {
    json[r'dawnAstronomical'] = null;
  }
  if (this.dawnNautical != null) {
    json[r'dawnNautical'] = this.dawnNautical;
  } else {
    json[r'dawnNautical'] = null;
  }
  if (this.dawnCivil != null) {
    json[r'dawnCivil'] = this.dawnCivil;
  } else {
    json[r'dawnCivil'] = null;
  }
  if (this.sunrise != null) {
    json[r'sunrise'] = this.sunrise;
  } else {
    json[r'sunrise'] = null;
  }
  if (this.noonTrue != null) {
    json[r'noonTrue'] = this.noonTrue;
  } else {
    json[r'noonTrue'] = null;
  }
  if (this.sunset != null) {
    json[r'sunset'] = this.sunset;
  } else {
    json[r'sunset'] = null;
  }
  if (this.duskCivil != null) {
    json[r'duskCivil'] = this.duskCivil;
  } else {
    json[r'duskCivil'] = null;
  }
  if (this.duskNautical != null) {
    json[r'duskNautical'] = this.duskNautical;
  } else {
    json[r'duskNautical'] = null;
  }
  if (this.duskAstronomical != null) {
    json[r'duskAstronomical'] = this.duskAstronomical;
  } else {
    json[r'duskAstronomical'] = null;
  }
  return json;
}