convertTimeTo24Hour function
Implementation
List<int> convertTimeTo24Hour(String time) {
List<int> timeList = [];
if (time.contains('AM')) {
time = time.replaceAll('AM', '');
timeList = time.split(':').map((e) => int.parse(e)).toList();
} else {
time = time.replaceAll('PM', '');
timeList = time.split(':').map((e) => int.parse(e)).toList();
timeList[0] = timeList[0] + 12;
}
return timeList;
}