@override DateTime? fromJson(Object? json) { if (json == null) return null; if (json is Timestamp) return json.toDate(); return DateTime.tryParse(json.toString()); }