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