getDateTime method
Reads named DateTime
from to the storage. Returns the read value or null
if value does not exist.
Implementation
Future<DateTime?> getDateTime(String key) async {
String? val = await this.getString(key);
return (val == null) ? null : DateTime.parse(val);
// if (val == null) return null;
// return DateTime.parse(val);
}