toEqualSizeText method

String toEqualSizeText()

Implementation

String toEqualSizeText() {
  int max = 0;
  for (final value in values) {
    final len = value.name.length;
    if (len > max) {
      max = len;
    }
  }
  final diff = max - name.length;
  if (diff > 0) {
    return List.filled(diff, ' ').join() + name.toUpperCase();
  }
  return name.toUpperCase();
}