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