https://github.com/shan-shaji/slug
Terminal progress utility to show while doing long tasks 🐌 that supports multiple spinners.
https://github.com/shan-shaji/slug
cli console dart dart2 packages progrees pubdev spinners terminal
Last synced: 5 months ago
JSON representation
Terminal progress utility to show while doing long tasks 🐌 that supports multiple spinners.
- Host: GitHub
- URL: https://github.com/shan-shaji/slug
- Owner: shan-shaji
- License: mit
- Created: 2022-01-24T20:20:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T03:22:25.000Z (about 2 years ago)
- Last Synced: 2025-02-02T14:42:25.220Z (over 1 year ago)
- Topics: cli, console, dart, dart2, packages, progrees, pubdev, spinners, terminal
- Language: Dart
- Homepage: https://pub.dev/packages/slug
- Size: 1.03 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
SLUG 🐌
Terminal progress with different spinners.
## Install
```dart
dart pub add slug
```
## Usage
```dart
var slug = Slug(
slugStyle: SlugStyle.toggle7,
);
var slug1 = Slug(
slugStyle: SlugStyle.noise,
);
var progress = slug.progress('doing some work');
await Future.delayed(Duration(seconds: 2));
progress.finish(message: "Completed!");
progress = slug1.progress('doing some work');
await Future.delayed(Duration(seconds: 2));
progress.finish(showTiming: true, message: "Completed!");
```
Spinners that are currently available can be accessed using `SlugStyle` enum.
```dart
enum SlugStyle {
dots,
dots2,
dots3,
dots4,
dots5,
dots6,
dots7,
dots8,
dots9,
dots10,
dots11,
dots12,
line,
line2,
pipe,
simpleDots,
star,
star2,
flip,
hamburger,
growVertical,
growHorizontal,
balloon,
balloon2,
noise,
bounce,
boxBounce,
boxBounce2,
triangle,
arc,
circle,
squareCorners,
circleQuarters,
circleHalves,
squish,
toggle,
toggle2,
toggle3,
toggle4,
toggle5,
toggle6,
toggle7,
toggle8,
toggle9,
toggle10,
arrow,
arrow2,
arrow3,
smiley,
monkey,
hearts,
clock,
earth,
weather,
}
```
## Supports
✅ Ubuntu
✅ Windows
✅ Mac OS
Inspired from [Ora](https://github.com/sindresorhus/ora) and [cli_util](https://github.com/dart-lang/cli_util). Thank you [sindresorhus](https://github.com/sindresorhus) for the amazing collection of spinners.