PromptAnswerRequiredException class final

Nobody can answer (the Cli's mode is non-interactive: a pipe, CI, --no-input) and the prompt has no default to take instead, or one its validation refuses (invalidDefault says why).

Nothing is read before it is thrown, so a command line can catch it and name the flag that answers question.

Inheritance

Constructors

PromptAnswerRequiredException(String question, {String? invalidDefault})
question has nobody to answer it, and no default, or one that failed validation with invalidDefault.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
invalidDefault → String?
The message the default failed validation with; null when there was no default at all.
final
question → String
The question that went unanswered, as the prompt was given it.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

operator ==(Object other) → bool
The equality operator.
inherited