Skip to content

Terminal progress utility to show while doing long tasks 🐌 that supports multiple spinners.

License

Notifications You must be signed in to change notification settings

shan-shaji/slug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SLUG 🐌

Terminal progress with different spinners.

Install

 dart pub add slug

Usage

  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.

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 and cli_util. Thank you sindresorhus for the amazing collection of spinners.

About

Terminal progress utility to show while doing long tasks 🐌 that supports multiple spinners.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages