padLeft method

String padLeft(
  1. int width, [
  2. String padding = '0'
])

Pads this number on the left with padding if it is shorter than width.

Implementation

String padLeft(int width, [String padding = '0']) => toString().padLeft(width, padding);