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