In flutter getting value but how to convert this in date format

print("day:" + day.toString());
print("month" + month.toString());
print("year" +year.toString());

getting this value:

I/flutter (12167): month10
I/flutter (12167): year1993

year value format as this - "1993-10-07". Now, how to convert the value into date-time format and show in this type of date format

Solution 1: Abhijith

String formatteddate="${year.toString()}-${month.toString().padLeft(2,'0')}-${day.toString().padLeft(2,'0')}"