fromJson static method

CarouselIndicatorConfig fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static CarouselIndicatorConfig fromJson(Map<String, dynamic>? json) {
  if (json == null) return const CarouselIndicatorConfig();
  return CarouselIndicatorConfig(
    showIndicator: optBool(json, 'showIndicator', true),
    dotHeight: optDouble(json, 'dotHeight', 8),
    dotWidth: optDouble(json, 'dotWidth', 8),
    spacing: optDouble(json, 'spacing', 12),
    dotColor: optString(json, 'dotColor', '#CBD5E1'),
    activeDotColor: optString(json, 'activeDotColor', '#4945FF'),
    indicatorEffectType: optString(json, 'indicatorEffectType', 'slide'),
  );
}