toButton property
override
A function called to provide ButtonBuilders that can be used to represent an element converted by this converter.
You might also be interested in:
- InteractiveContext.getButtonSelection, which makes use of this function;
- toSelectMenuOption, similar to this function but for SelectMenuOptionBuilders.
Implementation
@override
FutureOr<ButtonBuilder> Function(T)? get toButton =>
_toButton ??
(element) => ButtonBuilder(
style: ButtonStyle.primary,
label: stringify(element),
customId: '',
);