fromJson method

  1. @override
RangeSliderTickMarkShape? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

@override
RangeSliderTickMarkShape? fromJson(Map<String, dynamic>? json) {
  if (json == null) return null;

  String? type = json['type'];

  switch (type) {
    case 'round':
      return RoundRangeSliderTickMarkShape(
        tickMarkRadius: (json['tickMarkRadius'] as num?)?.toDouble(),
      );
  }

  throw 'Unsuported_Json_Value';
}