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