toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var expand = this.expand;
  var fields = this.fields;
  var hasScreen = this.hasScreen;
  var id = this.id;
  var isAvailable = this.isAvailable;
  var isConditional = this.isConditional;
  var isGlobal = this.isGlobal;
  var isInitial = this.isInitial;
  var looped = this.looped;
  var name = this.name;
  var to = this.to;

  final json = <String, Object?>{};
  if (expand != null) {
    json[r'expand'] = expand;
  }
  if (fields != null) {
    json[r'fields'] = fields;
  }
  json[r'hasScreen'] = hasScreen;
  if (id != null) {
    json[r'id'] = id;
  }
  json[r'isAvailable'] = isAvailable;
  json[r'isConditional'] = isConditional;
  json[r'isGlobal'] = isGlobal;
  json[r'isInitial'] = isInitial;
  json[r'looped'] = looped;
  if (name != null) {
    json[r'name'] = name;
  }
  if (to != null) {
    json[r'to'] = to.toJson();
  }
  return json;
}