This is my code:
String formatMinute() {
if (int.parse('${_time.minute}') < 10) {
String newMin = '${_time.minute}' + '0';
return newMin;
}
}
I would like the result of formatMinute() to be in a statefulWidget. Here is my code in the statefulWidget.
Text('Time selected: ${_time.hour}:${_time.minute}'),
I would like "${_time.minute}" to be replaced with the result of formatMinute(). Is this possible? Thanks for your time and help!