Formatting string in dart is not so easy.
In other languages, string format exists and you can format complex strings with just one line of code.
Sadly, dart doesn't have one like the others.
But luckily, padding characters in string can be done quite easily.
print('9'.padLeft(2, '0')); // '09'
String type supports extension methods 'padLeft' and 'padRight', which can be used to pad characters on existing strings.
reference : https://api.flutter.dev/flutter/dart-core/String/padLeft.html