PromptSpec class

One prompt spec: {key, type, default?, options?, question}.

Constructors

PromptSpec({required String key, required String type, required String question, String? defaultValue, List<String> options = const <String>[]})
Creates a PromptSpec.
const
PromptSpec.fromYaml(YamlMap m)
Parses one entry under the prompts: list.
factory

Properties

defaultValue → String?
Default value shown in brackets. Stored as a String regardless of type so the placeholder substitution layer has a uniform shape.
final
hashCode → int
The hash code for this object.
no setterinherited
key → String
Unique key used to store the answer in the prompt-result map.
final
options → List<String>
For choice prompts: the list of valid options. Empty otherwise.
final
question → String
Human-readable question text shown at the prompt.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
One of string / bool / choice.
final

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