toSelectMenuOption property

  1. @override
(FutureOr<SelectMenuOptionBuilder> Function(T)?) toSelectMenuOption
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:

Implementation

@override
FutureOr<SelectMenuOptionBuilder> Function(T)? get toSelectMenuOption =>
    _toSelectMenuOption ??
    (element) {
      String value = stringify(element);

      return SelectMenuOptionBuilder(
          label: value, value: value, description: null, emoji: null, isDefault: null);
    };