DateTime? timeFromJson(Object? json) { if (json == null) { return null; } else { return DateFormat.Hms().parse(json as String); } }