toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final json = <String, dynamic>{'type': integer ? 'integer' : 'number'};
  if (title != null) json['title'] = title;
  if (description != null) json['description'] = description;
  if (minimum != null) json['minimum'] = minimum;
  if (maximum != null) json['maximum'] = maximum;
  if (defaultValue != null) json['default'] = defaultValue;
  return json;
}