parse<T> method
Attempts to parse the current value of this context as a value of type T
.
If T
is not a supertype of the type of the parameter in the command callback, an exception
is thrown.
You might also be interested in:
- parseNamed, for parsing an arbitrary option;
- parseWithType, for parsing an argument with a given type.
Implementation
Future<T?> parse<T>() => parseNamed(option.name);