getTimeString static method
Implementation
static String getTimeString()
{
// Get the current date and time
DateTime currentDateTime = DateTime.now();
// Format the current date and time
String formattedDateTime =
'${currentDateTime.day.toString().padLeft(2, '0')}.'
'${currentDateTime.month.toString().padLeft(2, '0')}.'
'${currentDateTime.year} - '
'${currentDateTime.hour.toString().padLeft(2, '0')}:'
'${currentDateTime.minute.toString().padLeft(2, '0')}:'
'${currentDateTime.second.toString().padLeft(2, '0')}';
return formattedDateTime;
}