setPercent method
Updates the percentage for a specific bar.
Implementation
(MultiProgressModel, Cmd?) setPercent(
String key,
double p, {
bool animate = true,
}) {
final bar = bars[key];
if (bar == null) return (this, null);
final (newBar, cmd) = bar.setPercent(p, animate: animate);
final newBars = Map<String, ProgressModel>.from(bars);
newBars[key] = newBar;
return (MultiProgressModel(bars: newBars, width: width), cmd);
}