BotCommandPatterns extension
Adds pattern-matching-related methods to BotCommand.
- on
Methods
-
map<
TResult extends Object?> (TResult $default(_BotCommand value)) → TResult -
Available on BotCommand, provided by the BotCommandPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_BotCommand value)?) → TResult? -
Available on BotCommand, provided by the BotCommandPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_BotCommand value)?, {required TResult orElse()}) → TResult -
Available on BotCommand, provided by the BotCommandPatterns extension
A variant ofmapthat fallback to returningorElse.