writeValue method
Writes the current model value to the native input in yyyy-MM-ddTHH:mm
format.
Implementation
@override
/// Writes the current model value to the native input in `yyyy-MM-ddTHH:mm`
/// format.
void writeValue(value) {
DateTime? dec;
try {
dec = value as DateTime?;
} catch (_) {
return;
}
final rawValue = dec != null ? dec.toIso8601String().substring(0, 16) : '';
_element.value = rawValue;
}