Automatically generate a dart data class directly from a Firebase Firestore document.
Generate custom classes that support all the base firestore types, as well as custom types.
create an empty dart file, add your variables and run the Dart: Generate Firestore data class
command using ctrl+shift+P
or F1
- constructor that automatically adds important firestore methods
- fromFirestore and fromMap factories
- toMap function that for uploading to firestore
- copyWith method
- overwrites ==, toString and hashcode methods
- No support yet for nested Lists and Maps
this was a weekend project and is in no way finished yet. If you find any bugs or want to contribute, let me know on GitHub