Converter<T> class Null safety

Object used to convert raw argument strings to the type required by the command using them.

Implementers

Constructors

Converter(FutureOr<T?> convert(StringView view, Context context), {Iterable<ArgChoiceBuilder>? choices, CommandOptionType type = CommandOptionType.string})
Construct a new Converter. [...]
const

Properties

choices Iterable<ArgChoiceBuilder>?
A Iterable of choices users can choose from. [...]
final
convert FutureOr<T?> Function(StringView view, Context context)
The function called to process the input. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
output Type
The output Type of this converter.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type CommandOptionType
The CommandOptionType that arguments using this converter will use for Discord slash commands.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited