parseUtcISO static method
Implementation
static DateTime? parseUtcISO(String input) {
var value = input.trim();
if (value.isEmpty) return null;
try {
if (RegExp(r'[+-]\d{2}:?\d{2}$').hasMatch(value)) throw FormatException('Not a UTC timestamp');
if (!value.endsWith('Z')) {
value += 'Z';
}
return DateTime.parse(value);
} catch (_) {
return null;
}
}