withLeading method
pads left with number of zeros
Implementation
String withLeading(int width) {
if (this is int) {
return '${this < 0 ? '-' : ''}${abs().toString().padLeft(width, '0')}';
} else {
return '${floor().withLeading(width)}.'
'${(this - floor()).toString().split('.').last}';
}
}