Spinner class
A command-line spinner component that shows an animation to indicate a loading or processing state.
Constructors
- Spinner({String text = 'Loading', SpinnerType spinnerType = SpinnerType.dots, Duration interval = const Duration(milliseconds: 80)})
- Creates a new spinner with the specified configuration.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- interval → Duration
-
The interval between animation frames.
final
- isRunning → bool
-
Whether the spinner is currently running.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spinnerType → SpinnerType
-
The type of spinner animation to display.
final
- text → String
-
Gets the current spinner text.
no setter
Methods
-
error(
[String? message]) → void - Stops the spinner and shows an error message.
-
info(
[String? message]) → void - Stops the spinner and shows an info message.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → void - Starts the spinner animation.
-
stop(
) → void - Stops the spinner animation.
-
success(
[String? message]) → void - Stops the spinner and shows a success message.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateText(
String newText) → void - Updates the spinner text while it's running.
-
warn(
[String? message]) → void - Stops the spinner and shows a warning message.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited