toButton property
A function called to provide ButtonBuilder
s 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
SelectMenuOptionBuilder
s.
Implementation
@override
ButtonBuilder Function(T) get toButton => (n) => ButtonBuilder(
style: ButtonStyle.primary,
label: n.toString(),
customId: '',
);