removeFromList<T> method
Function to remove a value from a list in the room
Implementation
void removeFromList<T>(String key, T value) {
// Find the key of the value
for (MapEntry<String, dynamic> entry in getMap(key).entries) {
if (entry.value == value) {
ref!.child(key).child(entry.key).remove();
return;
}
}
}