toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var feature = this.feature;
  var imageUri = this.imageUri;
  var localisedDescription = this.localisedDescription;
  var localisedName = this.localisedName;
  var prerequisites = this.prerequisites;
  var projectId = this.projectId;
  var state = this.state;
  var toggleLocked = this.toggleLocked;

  final json = <String, Object?>{};
  if (feature != null) {
    json[r'feature'] = feature;
  }
  if (imageUri != null) {
    json[r'imageUri'] = imageUri;
  }
  if (localisedDescription != null) {
    json[r'localisedDescription'] = localisedDescription;
  }
  if (localisedName != null) {
    json[r'localisedName'] = localisedName;
  }
  json[r'prerequisites'] = prerequisites;
  if (projectId != null) {
    json[r'projectId'] = projectId;
  }
  if (state != null) {
    json[r'state'] = state.value;
  }
  json[r'toggleLocked'] = toggleLocked;
  return json;
}