toJson method
Implementation
Map<String, Object?> toJson() => {
'name': name,
'kind': kind.name,
'value': value,
'default': defaultValue,
if (min != null) 'min': min,
if (max != null) 'max': max,
if (step != null) 'step': step,
if (description != null) 'description': description,
if (options.isNotEmpty) 'options': options,
if (style != PickerStyle.dropdown) 'style': style.name,
};