fromJson method

  1. @override
RangeSliderTrackShape? fromJson(
  1. String? json
)
override

Implementation

@override
RangeSliderTrackShape? fromJson(String? json) {
  if (json == null) return null;

  switch (json) {
    case 'rectangular':
      return const RectangularRangeSliderTrackShape();

    case 'rounded':
      return const RoundedRectRangeSliderTrackShape();
  }

  throw 'Unsuported_Json_Value';
}