RichActionPatterns extension
Adds pattern-matching-related methods to RichAction.
- on
Methods
-
map<
TResult extends Object?> ({required TResult openUrl(OpenUrlAction value), required TResult sendMessage(SendMessageAction value), required TResult callback(CallbackAction value), required TResult requestInput(RequestInputAction value), required TResult changeLanguage(ChangeLanguageAction value)}) → TResult -
Available on RichAction, provided by the RichActionPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? openUrl(OpenUrlAction value)?, TResult? sendMessage(SendMessageAction value)?, TResult? callback(CallbackAction value)?, TResult? requestInput(RequestInputAction value)?, TResult? changeLanguage(ChangeLanguageAction value)?}) → TResult? -
Available on RichAction, provided by the RichActionPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult openUrl(OpenUrlAction value)?, TResult sendMessage(SendMessageAction value)?, TResult callback(CallbackAction value)?, TResult requestInput(RequestInputAction value)?, TResult changeLanguage(ChangeLanguageAction value)?, required TResult orElse()}) → TResult -
Available on RichAction, provided by the RichActionPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult openUrl(String url, String label, bool openInApp, String style)?, TResult sendMessage(String url, String label, bool openInApp, String style)?, TResult callback(String callbackId, String label, Map< String, dynamic> ? payload, String style)?, TResult requestInput(String inputType, String label, String source, String style)?, TResult changeLanguage(String locale)?, required TResult orElse()}) → TResult -
Available on RichAction, provided by the RichActionPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> ({required TResult openUrl(String url, String label, bool openInApp, String style), required TResult sendMessage(String url, String label, bool openInApp, String style), required TResult callback(String callbackId, String label, Map< String, dynamic> ? payload, String style), required TResult requestInput(String inputType, String label, String source, String style), required TResult changeLanguage(String locale)}) → TResult -
Available on RichAction, provided by the RichActionPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? openUrl(String url, String label, bool openInApp, String style)?, TResult? sendMessage(String url, String label, bool openInApp, String style)?, TResult? callback(String callbackId, String label, Map< String, dynamic> ? payload, String style)?, TResult? requestInput(String inputType, String label, String source, String style)?, TResult? changeLanguage(String locale)?}) → TResult? -
Available on RichAction, provided by the RichActionPatterns extension
A variant ofwhenthat fallback to returningnull