DepotPatterns extension

Adds pattern-matching-related methods to Depot.

on

Methods

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

Available on Depot, provided by the DepotPatterns extension

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

Available on Depot, provided by the DepotPatterns extension

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

Available on Depot, provided by the DepotPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(int? id, String? name, String? location, double? latitude, double? longitude, int? businessUnitId, int? depotTypeId, int? depotStatus, BusinessUnit? businessUnit, DepotType? depotType, InternalArea? internalArea, int? internalAreaId, DateTime? createdDate, String? cluster, String? internalRegion)?, {required TResult orElse()}) → TResult

Available on Depot, provided by the DepotPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(int? id, String? name, String? location, double? latitude, double? longitude, int? businessUnitId, int? depotTypeId, int? depotStatus, BusinessUnit? businessUnit, DepotType? depotType, InternalArea? internalArea, int? internalAreaId, DateTime? createdDate, String? cluster, String? internalRegion)) → TResult

Available on Depot, provided by the DepotPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(int? id, String? name, String? location, double? latitude, double? longitude, int? businessUnitId, int? depotTypeId, int? depotStatus, BusinessUnit? businessUnit, DepotType? depotType, InternalArea? internalArea, int? internalAreaId, DateTime? createdDate, String? cluster, String? internalRegion)?) → TResult?

Available on Depot, provided by the DepotPatterns extension

A variant of when that fallback to returning null