ShowOutcomePatterns extension

Adds pattern-matching-related methods to ShowOutcome.

on

Methods

map<TResult extends Object?>({required TResult shown(BeadShown value), required TResult unchanged(ShowUnchanged value), required TResult refused(ShowRefused value)}) → TResult

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? shown(BeadShown value)?, TResult? unchanged(ShowUnchanged value)?, TResult? refused(ShowRefused value)?}) → TResult?

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult shown(BeadShown value)?, TResult unchanged(ShowUnchanged value)?, TResult refused(ShowRefused value)?, required TResult orElse()}) → TResult

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult shown(String beadId, String title, IssueType issueType, BeadStatus status, int priority, String description, String design, String acceptanceCriteria, String notes, Map<String, String?> approval, List<BeadDependency> dependencies, String? revision, Map<String, int> withheld)?, TResult unchanged(String beadId, String revision)?, TResult refused(String beadId, String reason, int withheldReasonBytes)?, required TResult orElse()}) → TResult

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>({required TResult shown(String beadId, String title, IssueType issueType, BeadStatus status, int priority, String description, String design, String acceptanceCriteria, String notes, Map<String, String?> approval, List<BeadDependency> dependencies, String? revision, Map<String, int> withheld), required TResult unchanged(String beadId, String revision), required TResult refused(String beadId, String reason, int withheldReasonBytes)}) → TResult

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? shown(String beadId, String title, IssueType issueType, BeadStatus status, int priority, String description, String design, String acceptanceCriteria, String notes, Map<String, String?> approval, List<BeadDependency> dependencies, String? revision, Map<String, int> withheld)?, TResult? unchanged(String beadId, String revision)?, TResult? refused(String beadId, String reason, int withheldReasonBytes)?}) → TResult?

Available on ShowOutcome, provided by the ShowOutcomePatterns extension

A variant of when that fallback to returning null