toJson method

  1. @override
Map<String, dynamic>? toJson(
  1. SliderThemeData? value
)
override

Implementation

@override
Map<String, dynamic>? toJson(SliderThemeData? value) {
  if (value == null) return null;

  return <String, dynamic>{
    'activeTickMarkColor':
        const NullableColorConverter().toJson(value.activeTickMarkColor),
    'activeTrackColor':
        const NullableColorConverter().toJson(value.activeTrackColor),
    'disabledActiveTickMarkColor': const NullableColorConverter().toJson(
      value.disabledActiveTickMarkColor,
    ),
    'disabledActiveTrackColor':
        const NullableColorConverter().toJson(value.disabledActiveTrackColor),
    'disabledInactiveTickMarkColor': const NullableColorConverter().toJson(
      value.disabledInactiveTickMarkColor,
    ),
    'disabledInactiveTrackColor': const NullableColorConverter()
        .toJson(value.disabledInactiveTrackColor),
    'disabledThumbColor':
        const NullableColorConverter().toJson(value.disabledThumbColor),
    'inactiveTickMarkColor':
        const NullableColorConverter().toJson(value.inactiveTickMarkColor),
    'inactiveTrackColor':
        const NullableColorConverter().toJson(value.inactiveTrackColor),
    'minThumbSeparation': (value.minThumbSeparation),
    'overlappingShapeStrokeColor': const NullableColorConverter().toJson(
      value.overlappingShapeStrokeColor,
    ),
    'overlayColor': const NullableColorConverter().toJson(value.overlayColor),
    'overlayShape': const NullableSliderComponentShapeConverter()
        .toJson(value.overlayShape),
    'rangeThumbShape': const NullableRangeSliderThumbShapeConverter()
        .toJson(value.rangeThumbShape as RoundRangeSliderThumbShape?),
    'rangeTickMarkShape':
        const NullableRangeSliderTickMarkShapeConverter().toJson(
      value.rangeTickMarkShape,
    ),
    'rangeTrackShape': const NullableRangeSliderTrackShapeConverter()
        .toJson(value.rangeTrackShape),
    'rangeValueIndicatorShape':
        const NullableRangeSliderValueIndicatorShapeConverter().toJson(
      value.rangeValueIndicatorShape,
    ),
    'showValueIndicator': const NullableShowValueIndicatorConverter().toJson(
      value.showValueIndicator,
    ),
    'thumbColor': const NullableColorConverter().toJson(value.thumbColor),
    'thumbShape': const NullableSliderComponentShapeConverter()
        .toJson(value.thumbShape),
    'tickMarkShape': const NullableSliderTickMarkShapeConverter()
        .toJson(value.tickMarkShape),
    'trackHeight': value.trackHeight,
    'trackShape':
        const NullableSliderTrackShapeConverter().toJson(value.trackShape),
    'valueIndicatorColor':
        const NullableColorConverter().toJson(value.valueIndicatorColor),
    'valueIndicatorShape':
        const NullableSliderComponentShapeConverter().toJson(
      value.valueIndicatorShape,
    ),
    'valueIndicatorTextStyle': const NullableTextStyleConverter().toJson(
      value.valueIndicatorTextStyle,
    ),
  };

  throw 'Json_Unsuported_Value';
}