PromptLine class

Asks one question on one line until the answer passes a check.

Used by ask, confirm and the plain menu. With colour on, a wrong answer shows a themed error line under the question, and the question is redrawn in place. Once answered, the line is redrawn with a tick and the answer in the theme's answer colour.

Properties

hashCode → int
The hash code for this object.
no setterinherited
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.
inherited

Operators

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

Static Methods

run<T>(String question, {required PromptCheck<T> check, required String shown(T value), String hint = '', bool hidden = false}) → T
Shows question (with an optional dim hint) until check accepts.