I am using mongo_dart.
Some field contains the Int64 type.
I tried to convert the Map<String, dynamic> type that receive from MongoDB to the JSON by using the jsonEncode function but I got this error:
Converting object to an encodable object failed: Instance of 'Int64'
How to fix this?
Should I change the field type to String?
Should I create a function that converts every element in the Map<String, dynamic> from Int64 to Int?