Terminal progress with different spinners.
dart pub add slug
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,
}
β
Ubuntu
β
Windows
β
Mac OS
Inspired from Ora and cli_util. Thank you sindresorhus for the amazing collection of spinners.