ProgressBar constructor
ProgressBar({
- required ProgressBarFormatter formatter,
- required int total,
- int? width,
- String completeChar = '=',
- String incompleteChar = '-',
Create a ProgressBar instance.
See ProgressBar.formatter for formatting documentation. Also see ProgressBar.total, ProgressBar.width, ProgressBar.completeChar, and ProgressBar.incompleteChar.
Implementation
ProgressBar({
required this.formatter,
required int total,
this.width,
String completeChar = '=',
String incompleteChar = '-',
}) : assert(total > 1),
_total = total,
assert(completeChar.length == 1),
_completeChar = completeChar,
assert(incompleteChar.length == 1),
_incompleteChar = incompleteChar;