console_bars 1.2.0 copy "console_bars: ^1.2.0" to clipboard
console_bars: ^1.2.0 copied to clipboard

A package for creating a customizable progress bar in console easily.

example/console_bars_example.dart

import 'package:console_bars/console_bars.dart';

void main(List<String> args) async {
  // A bar that looks like
  //
  // Loading : ████████████████████████████████████████.................... 673/1000 67.3% [ 0:00:13.28 / 0:00:06.45 ]
  //
  final p = FillingBar(
      desc: "Loading", total: 1000, time: true, percentage: true, scale: 0.2);
  for (var i = 0; i < 500; i++) {
    p.increment();
    await Future.delayed(Duration(milliseconds: 10));
  }

  // Change the description and total mid-way
  await Future.delayed(Duration(seconds: 2));
  p.total = 750;
  p.desc = "Processing";
  await Future.delayed(Duration(seconds: 2));

  for (var i = 0; i < 250; i++) {
    p.increment();
    await Future.delayed(Duration(milliseconds: 5));
  }

  print("\nDone");
}
30
likes
160
points
561
downloads

Publisher

unverified uploader

Weekly Downloads

A package for creating a customizable progress bar in console easily.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

More

Packages that depend on console_bars