v1.0.1cli_spin
A Dart package that enhances the user experience by displaying a sleek terminal spinner for both sync and async operations.
33Likes 6.7K30-day downloads150Pub points
AndroidiOSmacOSWindowsLinux
A Dart package that enhances the user experience by displaying a sleek terminal spinner for both sync and async operations.
English project snapshot. Visit GitHub for the latest content.
A Dart package that enhances the user experience by displaying a sleek terminal spinner for both sync and async operations.
preview
CliSpinnersCliSpinnerColor helpersuccess, fail, warn and info methods (cross-platform compatible)TODO: List prerequisites and provide or point to information on how to start using the package.
import 'dart:async';
import 'package:cli_spin/cli_spin.dart';
void main() {
// Instantiate spinner
final spinner = CliSpin(
text: 'Loading data...',
spinner: CliSpinners.line,
).start(); // Chaining methods
Timer(Duration(milliseconds: 1000), () {
// Change spinner color
spinner.color = CliSpinnerColor.yellow;
// Change spinner text
spinner.text = 'Still loading, please wait...';
Timer(Duration(milliseconds: 1000), () {
// Alias for `stopAndPersist(...)` method
spinner.success('Data loaded successfully.');
});
});
}
Inspired by the ora library written in Javascript.