CarouselConfigPatterns extension

Adds pattern-matching-related methods to CarouselConfig.

on

Methods

map<TResult extends Object?>(TResult $default(_CarouselConfig value)) → TResult

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_CarouselConfig value)?) → TResult?

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_CarouselConfig value)?, {required TResult orElse()}) → TResult

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(bool autoPlay, int autoPlayInterval, bool showIndicators, bool showArrows, int itemsVisible, double spacing)?, {required TResult orElse()}) → TResult

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(bool autoPlay, int autoPlayInterval, bool showIndicators, bool showArrows, int itemsVisible, double spacing)) → TResult

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(bool autoPlay, int autoPlayInterval, bool showIndicators, bool showArrows, int itemsVisible, double spacing)?) → TResult?

Available on CarouselConfig, provided by the CarouselConfigPatterns extension

A variant of when that fallback to returning null