toJson abstract method

Map<String, dynamic> toJson()

Converts the object to a Firestore-compatible map.

Returns a Map with string keys and dynamic values that can be directly written to Firestore. All complex objects should be converted to basic Firestore-supported types.

Example:

@override
Map<String, dynamic> toJson() => {
  'field1': value1,
  'field2': value2,
};

Implementation

Map<String, dynamic> toJson();