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
ButtonBuilder Function(T) get toButton => (n) => ButtonBuilder(
style: ButtonStyle.primary,
label: n.toString(),
customId: '',
);