cli_progress_bar 1.0.4 copy "cli_progress_bar: ^1.0.4" to clipboard
cli_progress_bar: ^1.0.4 copied to clipboard

discontinued

Package for creating cli progress bar, customizing it.

pub package

Languages:

English Russian

About package #

The package provides the ability to output the progress bar to the terminal, change its appearance and change the degree of progress in it.

Example #

Alt Text

Alt Text

How to use #

The progress bar consists of 3 main parts:

  • before. Arbitrary user content. In the scheme, it is marked with the #before tag. If it is null, then nothing will be output instead of the #before tag;
  • bar. In the scheme, it is marked with the #bar tag, instead of the tag, the progress bar itself will be output;
  • after. Arbitrary user content. In the scheme, it is marked with the #after tag. If null, then nothing will be output instead of the #after tag.

When creating progress bar, you must specify the scheme. The scheme uses tags to indicate the places where the content will be displayed.

Example of the scheme: '#before #bar #after'. Instead of the #before tag, the before content will be output, instead of the #after tag, the after content will be output, instead of the #bar tag, the progress bar itself will be output.

Example of creating and launching progress bar, increasing its fullness:

final schema = '#before [#bar] #after';

final max = 100;

final bar = ProgressBar(
    schema: schema,
    before: 'Progress',
    after: '0/$max',
    settings: ProgressBarSettings(
        max: max,
        size: 100 * 0.1,
    ),
);

bar.update();

bar.setProgress(10);

bar.update();

You can change the appearance and settings of your progress bar using ProgressBarSettings:

  • max. Maximum progress;
  • size. The size of the progress bar in characters;
  • filled. The symbol of the filled part;
  • notFilled. Blank part symbol;
  • edge. The symbol of the extreme character of the filled part.
1
likes
140
points
28
downloads

Publisher

verified publisherbatykov-gleb.ru

Weekly Downloads

Package for creating cli progress bar, customizing it.

Repository (GitHub)
View/report issues

Topics

#cli #progress #bar

Documentation

API reference

License

MIT (license)

Dependencies

dart_console

More

Packages that depend on cli_progress_bar