FxNotificationPatterns extension
Adds pattern-matching-related methods to FxNotification.
Methods
-
map<
TResult extends Object?> (TResult $default(_FxNotification value)) → TResult -
Available on FxNotification, provided by the FxNotificationPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_FxNotification value)?) → TResult? -
Available on FxNotification, provided by the FxNotificationPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_FxNotification value)?, {required TResult orElse()}) → TResult -
Available on FxNotification, provided by the FxNotificationPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String title, String body, bool read, String createdAt, Map< String, dynamic> ? data)?, {required TResult orElse()}) → TResult -
Available on FxNotification, provided by the FxNotificationPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(String id, String title, String body, bool read, String createdAt, Map< String, dynamic> ? data)) → TResult -
Available on FxNotification, provided by the FxNotificationPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String title, String body, bool read, String createdAt, Map< String, dynamic> ? data)?) → TResult? -
Available on FxNotification, provided by the FxNotificationPatterns extension
A variant ofwhenthat fallback to returningnull