formatAligned function

String formatAligned(
  1. num v,
  2. int width,
  3. PrintOptions options
)

Implementation

String formatAligned(num v, int width, PrintOptions options) {
  String s;
  if (v is int || (v is double && v == v.roundToDouble())) {
    s = formatInt(v.toInt());
  } else {
    s = formatFloat(v, options.precision, options.suppress);
  }
  return s.padLeft(width, ' ');
}