fromJson method
Implementation
@override
SliderThemeData? fromJson(Map<String, dynamic>? json) {
if (json == null) return null;
return SliderThemeData(
activeTickMarkColor: const NullableColorConverter().fromJson(
json['activeTickMarkColor'],
),
activeTrackColor: const NullableColorConverter().fromJson(
json['activeTrackColor'],
),
disabledActiveTickMarkColor: const NullableColorConverter().fromJson(
json['disabledActiveTickMarkColor'],
),
disabledActiveTrackColor: const NullableColorConverter().fromJson(
json['disabledActiveTrackColor'],
),
disabledInactiveTickMarkColor: const NullableColorConverter().fromJson(
json['disabledInactiveTickMarkColor'],
),
disabledInactiveTrackColor: const NullableColorConverter().fromJson(
json['disabledInactiveTrackColor'],
),
disabledThumbColor: const NullableColorConverter().fromJson(
json['disabledThumbColor'],
),
inactiveTickMarkColor: const NullableColorConverter().fromJson(
json['inactiveTickMarkColor'],
),
inactiveTrackColor: const NullableColorConverter().fromJson(
json['inactiveTrackColor'],
),
minThumbSeparation: (json['minThumbSeparation'] as num?)?.toDouble(),
overlappingShapeStrokeColor: const NullableColorConverter().fromJson(
json['overlappingShapeStrokeColor'],
),
overlayColor: const NullableColorConverter().fromJson(
json['overlayColor'],
),
overlayShape: const NullableSliderComponentShapeConverter().fromJson(
json['overlayShape'],
),
rangeThumbShape: const NullableRangeSliderThumbShapeConverter().fromJson(
json['rangeThumbShape'],
),
rangeTickMarkShape:
const NullableRangeSliderTickMarkShapeConverter().fromJson(
json['rangeTickMarkShape'],
),
rangeTrackShape: const NullableRangeSliderTrackShapeConverter().fromJson(
json['rangeTrackShape'],
),
rangeValueIndicatorShape:
const NullableRangeSliderValueIndicatorShapeConverter().fromJson(
json['rangeValueIndicatorShape'],
),
showValueIndicator: const NullableShowValueIndicatorConverter().fromJson(
json['showValueIndicator'],
),
thumbColor: const NullableColorConverter().fromJson(
json['thumbColor'],
),
// @unencodable
// thumbSelector
thumbShape: const NullableSliderComponentShapeConverter().fromJson(
json['thumbShape'],
),
tickMarkShape: const NullableSliderTickMarkShapeConverter().fromJson(
json['tickMarkShape'],
),
trackHeight: (json['trackHeight'] as num?)?.toDouble(),
trackShape: const NullableSliderTrackShapeConverter().fromJson(
json['trackShape'],
),
valueIndicatorColor: const NullableColorConverter().fromJson(
json['valueIndicatorColor'],
),
valueIndicatorShape:
const NullableSliderComponentShapeConverter().fromJson(
json['valueIndicatorShape'],
),
valueIndicatorTextStyle: const NullableTextStyleConverter().fromJson(
json['jsonIndicatorTextStyle'],
),
);
}