runWith method
Runs the progress bar with a callback that provides updates.
Implementation
void runWith(
void Function(void Function(int current, int total) update) callback) {
runSession(() {
int phase = 0;
callback((current, total) {
show(current: current, total: total, shimmerPhase: phase++);
});
}, plainStart: prompt, plainSuccess: prompt);
}