LoadingSpinner constructor

LoadingSpinner(
  1. String prompt, {
  2. String message = 'Loading',
  3. SpinnerStyle style = SpinnerStyle.dots,
  4. PromptTheme theme = PromptTheme.dark,
})

Creates a loading spinner.

The prompt is the label displayed above the spinner. The message is the text displayed next to the spinner. The style determines the visual appearance of the spinner. The theme controls the colors used for the spinner and text.

Direct construction captures the ambient terminal and automatically detected execution mode at construction time. Use Terminice.loadingSpinner to capture a client's terminal and explicit fallback policy at creation time.

Implementation

LoadingSpinner(
  this.prompt, {
  this.message = 'Loading',
  this.style = SpinnerStyle.dots,
  this.theme = PromptTheme.dark,
}) : _taskClient = null {
  initializeAutomatically();
}