Prompts class
Interactive CLI prompting helper with fallback for non-interactive environments.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInteractive → bool
-
no setter
- logger → Logger
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
confirm(
{required String prompt, bool defaultValue = true}) → bool - Prompts user for a yes/no boolean confirmation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveConflict(
{required String filePath, bool force = false, bool skipExisting = false}) → FileConflictAction - Decision when file conflict occurs: skip, overwrite, rename.
-
select(
{required String prompt, required List< String> options, String? defaultValue}) → String - Prompts user to select an option from a list.
-
text(
{required String prompt, String? defaultValue, String? validator(String)?}) → String - Prompts user for a freeform text input with optional validator and default.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited