tryGetDateTime method
Tries to convert the value at key (or alternativeKeys) to DateTime.
Implementation
DateTime? tryGetDateTime(
K key, {
List<K>? alternativeKeys,
dynamic innerKey,
int? innerListIndex,
String? format,
String? locale,
bool autoDetectFormat = false,
bool useCurrentLocale = false,
bool utc = false,
DateTime? defaultValue,
ElementConverter<DateTime>? converter,
}) => ConvertObjectImpl.tryToDateTime(
_firstValueForKeys(key, alternativeKeys: alternativeKeys),
mapKey: innerKey,
listIndex: innerListIndex,
format: format,
locale: locale,
autoDetectFormat: autoDetectFormat,
useCurrentLocale: useCurrentLocale,
utc: utc,
defaultValue: defaultValue,
converter: converter,
debugInfo: {
'key': key,
if (alternativeKeys != null && alternativeKeys.isNotEmpty)
'altKeys': alternativeKeys,
},
);