starsDisplay method
Renders star rating display.
Implementation
void starsDisplay(
int value,
int maxStars, {
String filledStar = '★',
String emptyStar = '☆',
}) {
final buffer = StringBuffer();
for (int i = 1; i <= maxStars; i++) {
final isFilled = i <= value;
final isCurrent = i == value;
final color =
isCurrent ? theme.highlight : (isFilled ? theme.accent : theme.gray);
final glyph = isFilled ? filledStar : emptyStar;
final star = isCurrent ? '${theme.bold}$glyph${theme.reset}' : glyph;
buffer.write('$color$star${theme.reset}');
if (i < maxStars) buffer.write(' ');
}
gutterLine(buffer.toString());
}