AtsPossibleExitPatterns extension

Adds pattern-matching-related methods to AtsPossibleExit.

on

Methods

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

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

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

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

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

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String? id, String? fromAssetId, Asset? fromAsset, String? sensorId, Sensor? sensor, String? toAssetId, Asset? toAsset, double? totalLiters, DateTime? startAt, DateTime? endAt, bool? isReady, bool? inProgress, bool? isValidated)?, {required TResult orElse()}) → TResult

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String? id, String? fromAssetId, Asset? fromAsset, String? sensorId, Sensor? sensor, String? toAssetId, Asset? toAsset, double? totalLiters, DateTime? startAt, DateTime? endAt, bool? isReady, bool? inProgress, bool? isValidated)) → TResult

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String? id, String? fromAssetId, Asset? fromAsset, String? sensorId, Sensor? sensor, String? toAssetId, Asset? toAsset, double? totalLiters, DateTime? startAt, DateTime? endAt, bool? isReady, bool? inProgress, bool? isValidated)?) → TResult?

Available on AtsPossibleExit, provided by the AtsPossibleExitPatterns extension

A variant of when that fallback to returning null