CliPrompter class

Minimal terminal prompt helper for interactive CLI flows.

Constructors

CliPrompter({required StringSink out, CliReadLine? readLine, bool? interactive})
Creates a prompt helper with injectable input and output.

Properties

hashCode int
The hash code for this object.
no setterinherited
isInteractive bool
Whether interactive stdin is available.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

confirm(String message, {bool defaultValue = false}) bool
Prompts the user for a yes/no confirmation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
promptRequired(String message, {String? defaultValue, String? errorMessage}) String
Prompts the user for a non-empty string value.
toString() String
A string representation of this object.
inherited

Operators

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