showProgress static method
Show progress during file processing
Implementation
static void showProgress(int current, int total, String currentFile) {
final percent = (current / total * 100).toStringAsFixed(0);
final bar = _makeProgressBar(current, total, 30);
// Use carriage return to overwrite the line
stdout.write('\r[$bar] $percent% ($current/$total) $currentFile'.padRight(100));
// If complete, move to next line
if (current == total) {
print('');
}
}