toSelectMenuOption property
override
A function called to provide SelectMenuOptionBuilders that can be used to represent an element converted by this converter.
The builder returned by this function should have a value that this converter will be able to convert.
You might also be interested in:
- InteractiveContext.getSelection and InteractiveContext.getMultiSelection, which make use of this function;
- toButton, similar to this function but for ButtonBuilders.
Implementation
@override
FutureOr<SelectMenuOptionBuilder> Function(T)? get toSelectMenuOption {
if (_toSelectMenuOption != null) {
return _toSelectMenuOption;
}
for (final converter in converters) {
if (converter.toSelectMenuOption is FutureOr<SelectMenuOptionBuilder> Function(T)) {
return converter.toSelectMenuOption;
}
}
return null;
}