startSpinner function

Future<Isolate> startSpinner(
  1. SpinnerType type
)

Starts an animation on a new line.

Implementation

Future<Isolate> startSpinner(SpinnerType type) async {
  stdout.write('\x1B[?25l'); // Hide the cursor.
  return _spinnerIsolate ?? (_spinnerIsolate = await Isolate.spawn(_animate, type));
}