getDateTime method

DateTime? getDateTime(
  1. String key, {
  2. DateTime? defaultValue,
})

Implementation

DateTime? getDateTime(String key, {DateTime? defaultValue}) {
  final micros = getInt(key);
  if (micros == null) return defaultValue;

  return DateTime.fromMicrosecondsSinceEpoch(micros, isUtc: true);
}