fromJson method
Implementation
@override
RangeSliderThumbShape? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
String? type = json['type'];
switch (type) {
case 'round':
return RoundRangeSliderThumbShape(
disabledThumbRadius:
(json['disabledThumbRadius'] as num?)?.toDouble(),
elevation: ((json['elevation'] ?? 1.0) as num).toDouble(),
enabledThumbRadius:
((json['enabledThumbRadius'] ?? 10.0) as num).toDouble(),
pressedElevation:
((json['pressedElevation'] ?? 6.0) as num).toDouble(),
);
}
throw 'Unsuported_Json_Value';
}