So I've been working on this project, and everything worked fine, until, I migrated the packages to null safety and encountered this error. Here's the code:
factory AdminDto.fromJson(Map<String, dynamic> json) => _$AdminDtoFromJson(json);
factory AdminDto.fromFirestore(DocumentSnapshot doc) {
return AdminDto.fromJson(doc.data()!).copyWith(id: doc.id);
}
}
Can someone please help me with this? The problem occurs when it comes to doc.data() parameter. I can't quite put my head into it.