toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  if (_originalDoc != null) return Map.from(_originalDoc!);

  Map<String, dynamic> jsonObject = {};
  jsonObject['id'] = id;
  jsonObject['type'] = type;
  return jsonObject;
}