UNotificationTargetPatterns extension
Adds pattern-matching-related methods to UNotificationTarget.
Methods
-
map<
TResult extends Object?> ({required TResult reportRef(UNotificationTargetReportRef value), required TResult subjectRef(UNotificationTargetSubjectRef value), required TResult standingRef(UNotificationTargetStandingRef value), required TResult unknown(UNotificationTargetUnknown value)}) → TResult -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? reportRef(UNotificationTargetReportRef value)?, TResult? subjectRef(UNotificationTargetSubjectRef value)?, TResult? standingRef(UNotificationTargetStandingRef value)?, TResult? unknown(UNotificationTargetUnknown value)?}) → TResult? -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult reportRef(UNotificationTargetReportRef value)?, TResult subjectRef(UNotificationTargetSubjectRef value)?, TResult standingRef(UNotificationTargetStandingRef value)?, TResult unknown(UNotificationTargetUnknown value)?, required TResult orElse()}) → TResult -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult reportRef(ReportRef data)?, TResult subjectRef(SubjectRef data)?, TResult standingRef(StandingRef data)?, TResult unknown(Map< String, dynamic> data)?, required TResult orElse()}) → TResult -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> ({required TResult reportRef(ReportRef data), required TResult subjectRef(SubjectRef data), required TResult standingRef(StandingRef data), required TResult unknown(Map< String, dynamic> data)}) → TResult -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? reportRef(ReportRef data)?, TResult? subjectRef(SubjectRef data)?, TResult? standingRef(StandingRef data)?, TResult? unknown(Map< String, dynamic> data)?}) → TResult? -
Available on UNotificationTarget, provided by the UNotificationTargetPatterns extension
A variant ofwhenthat fallback to returningnull