ProfileAssociatedChatAllowIncomingPatterns extension

Adds pattern-matching-related methods to ProfileAssociatedChatAllowIncoming.

on

Methods

map<TResult extends Object?>({required TResult knownValue(ProfileAssociatedChatAllowIncomingKnownValue value), required TResult unknown(ProfileAssociatedChatAllowIncomingUnknown value)}) → TResult

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? knownValue(ProfileAssociatedChatAllowIncomingKnownValue value)?, TResult? unknown(ProfileAssociatedChatAllowIncomingUnknown value)?}) → TResult?

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult knownValue(ProfileAssociatedChatAllowIncomingKnownValue value)?, TResult unknown(ProfileAssociatedChatAllowIncomingUnknown value)?, required TResult orElse()}) → TResult

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult knownValue(KnownProfileAssociatedChatAllowIncoming data)?, TResult unknown(String data)?, required TResult orElse()}) → TResult

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>({required TResult knownValue(KnownProfileAssociatedChatAllowIncoming data), required TResult unknown(String data)}) → TResult

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? knownValue(KnownProfileAssociatedChatAllowIncoming data)?, TResult? unknown(String data)?}) → TResult?

Available on ProfileAssociatedChatAllowIncoming, provided by the ProfileAssociatedChatAllowIncomingPatterns extension

A variant of when that fallback to returning null