toJson method
Implementation
@override
Map<String, dynamic>? toJson(SliderTrackShape? object) {
if (object == null) return null;
if (object is RectangularSliderTrackShape) {
return <String, dynamic>{
'type': 'rectangular',
};
} else if (object is RoundedRectSliderTrackShape) {
return <String, dynamic>{
'type': 'rounded',
};
}
throw 'Json_Unsuported_Value';
}