UserPrompt class
Unified API for all prompt utilities
This class delegates to specialized prompt classes for each category. You can either use this unified class or import specific prompt classes directly.
Constructors
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
-
askConfirm(
String question, {bool defaultValue = true, String yesLabel = 'Yes', String noLabel = 'No'}) → Future< bool> -
askDouble(
String question, {required double defaultValue, double? min, double? max}) → Future< double> -
askEmail(
String question, {String? defaultValue}) → Future< String> -
askInt(
String question, {required int defaultValue, int? min, int? max}) → Future< int> -
askMultiSelect(
String title, List< String> options, {List<String> ? defaultSelected, List<bool> ? defaults}) → Future<List< int> > -
askMultiSelectNames(
String title, List< String> options, {List<String> ? defaultSelected}) → Future<List< String> > -
askPassword(
String prompt, {bool confirm = false, String? confirmPrompt}) → Future< String> -
askPrioritize(
String title, List< String> items) → Future<List< String> > -
askRetryChoice(
String operationName) → Future< RetryChoice> -
askSecret(
String prompt) → Future< String> -
askSort(
String title, List< String> options, {bool showOutput = true}) → Future<List< String> > -
askSortGetValues(
String title, List< String> options, {bool showOutput = true}) → Future<List< String> > -
askString(
String question, {String? defaultValue, bool validator(String)?, String? validationMessage}) → Future< String> -
askTheme(
String prompt, List< String> themes, List<String> descriptions, {int initialIndex = 0}) → Future<int> -
askUrl(
String question, {String? defaultValue}) → Future< String> -
askYesNo(
String question, {bool defaultValue = true}) → Future< bool> -
clearScreen(
) → void -
createProgress(
int total, {String? rightPrompt, double size = 0.5}) → OracularProgressState -
pressEnter(
{String message = 'Press Enter to continue...'}) → Future< void> -
printBanner(
String title, {String? subtitle}) → void -
printConfigPreview(
Map< String, String> config, {String title = 'Configuration Preview'}) → void -
printDivider(
{String? title, int width = 60}) → void -
printErrorBox(
String message, {String? hint}) → void -
printList(
List< String> items, {String bullet = '•'}) → void -
printNumberedList(
List< String> items) → void -
printStepIndicator(
int currentStep, int totalSteps, String stepName) → void -
printSuccessBox(
String message, {List< String> ? details}) → void -
runWizard(
String title, List< WizardStep> steps) → Future<Map< String, dynamic> > -
showMenu(
String title, List< String> options, {int? defaultIndex}) → Future<int> -
showMenuGetValue(
String title, List< String> options, {int? defaultIndex}) → Future<String> -
showProgress(
int current, int total, String message) → void -
withLoadingSpinner<
T> (String message, Future< T> action(), {String? failedMessage}) → Future<T> -
withProgress<
T> (String title, List< Future< tasks, {List<T> Function()>String> ? taskNames}) → Future<void> -
withRetry<
T> (String operationName, Future< T> action(), {int maxRetries = 3}) → Future<T?> -
withSpinner<
T> (String message, Future< T> action(), {String? doneMessage, String? failedMessage, String? icon, bool isSuccess(T result)?}) → Future<T>