static int timeStringToHour(String timeString) { try { return int.parse(timeString.split(':')[0]); } catch (e) { return 9; // Default to 9 AM } }