formatStatusLinePercent function

String formatStatusLinePercent(
  1. double percent
)

omp's embedded-gauge percent format: toFixed(1) ONLY below 1 %, integer otherwise (0.3%, 42%, 100%).

Implementation

String formatStatusLinePercent(double percent) =>
    '${percent > 0 && percent < 1 ? percent.toStringAsFixed(1) : percent.round()}%';