toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var color = this.color;
  var id = this.id;
  var moduleKey = this.moduleKey;
  var position = this.position;
  var title = this.title;
  var uri = this.uri;

  final json = <String, Object?>{};
  json[r'color'] = color.value;
  json[r'id'] = id;
  if (moduleKey != null) {
    json[r'moduleKey'] = moduleKey;
  }
  json[r'position'] = position.toJson();
  json[r'title'] = title;
  if (uri != null) {
    json[r'uri'] = uri;
  }
  return json;
}