getEntity method
Implementation
@override
Future<FeedEntity?> getEntity(String? id,
{Function(Exception)? onError}) async {
try {
var collection = feedCollection.doc(id);
var doc = await collection.get();
return FeedEntity.fromMap(doc.data());
} on Exception catch (e) {
if (onError != null) {
onError(e);
} else {
print("Error whilst retrieving Feed with id $id");
print("Exceptoin: $e");
}
}
return null;
}