get method
Reads the document referenced by this DocumentReference.
If no document exists, the read will return null.
Implementation
Future<DocumentSnapshot?> get() async {
http.Response response =
await httpr.get(Uri.encodeFull(documentUri), headers: headers);
int httpStatusCode = response.statusCode;
if (httpStatusCode == HttpStatus.ok) {
Map<String, dynamic> jsonResponse = json.decode(response.body);
_id = jsonResponse['id'];
return DocumentSnapshot._(path, jsonResponse);
} else {
return null;
}
}