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
Aswitch-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 ofmapthat fallback to returningnull. -
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 ofmapthat fallback to returningorElse. -
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 ofwhenthat fallback to anorElsecallback. -
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
Aswitch-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 ofwhenthat fallback to returningnull