You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2026. It is now read-only.
The generated code will have whereGender, orderByGender and other Gender related things, like _$MalePerFieldToJson.gender(...) but the _$MalePerFieldToJson class doesn't have gender getter in it.
Possible fixes:
As toJson and fromJson are only generated for id and i fields and not the gender field. The cloud_firestore_odm should also not generate anything for gender.
// `gender` is not generated.Male_$MaleFromJson(Map<String, dynamic> json) =>Male(
id: (json['id'] asnum).toInt(),
i: (json['i'] asnum).toInt(),
);
// `gender` is not generatedMap<String, dynamic> _$MaleToJson(Male instance) =><String, dynamic>{
'id': instance.id,
'i': instance.i,
};
Or, the generated class _$MalePerFieldToJson should also include the gender property.
Minimal reproducible code
dart run build_runner build -d.whereGender,orderByGenderand otherGenderrelated things, like_$MalePerFieldToJson.gender(...)but the_$MalePerFieldToJsonclass doesn't havegendergetter in it.Possible fixes:
toJsonandfromJsonare only generated foridandifields and not thegenderfield. Thecloud_firestore_odmshould also not generate anything forgender._$MalePerFieldToJsonshould also include thegenderproperty.Specifications