toJson method

Map<String, dynamic> toJson()

Converts the entry to a JSON-compatible map, including the document ID.

Implementation

Map<String, dynamic> toJson() => {
      'id': id,
      ...toMap(),
    };