marks method
The ratio to the baseline with its mark, such as 🔻2.5x, followed by
similarMark when the difference is not significant; otherwise
bestMark for the best cell; otherwise empty. So with a baseline and
ratios, only the baseline cell can get bestMark.
Implementation
String marks(ComparisonCell cell) {
final ratio = cell.ratio;
if (ratios && ratio != null && ratio > 0) {
final faster = ratio >= 1;
final mark = faster ? fasterMark : slowerMark;
final text = '$mark${formatDecimal(faster ? ratio : 1 / ratio)}x';
return cell.isSimilar ? '$text $similarMark' : text;
}
return cell.isBest ? bestMark : '';
}