fromJson method
Implementation
@override
SliderTrackShape? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
String? type = json['type'];
switch (type) {
case 'rectangular':
return const RectangularSliderTrackShape();
case 'rounded':
return const RoundedRectSliderTrackShape();
}
throw 'Unsuported_Json_Value';
}