toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var backgroundColor = this.backgroundColor;
  var button = this.button;
  var primaryNavigation = this.primaryNavigation;
  var secondaryNavigation = this.secondaryNavigation;
  var search = this.search;

  final json = <String, Object?>{};
  json[r'backgroundColor'] = backgroundColor;
  if (button != null) {
    json[r'button'] = button.toJson();
  }
  json[r'primaryNavigation'] = primaryNavigation.toJson();
  if (secondaryNavigation != null) {
    json[r'secondaryNavigation'] = secondaryNavigation.toJson();
  }
  if (search != null) {
    json[r'search'] = search.toJson();
  }
  return json;
}