I am trying to find out a way to handle no data in the DB state (zero state).
My code is:
Database.database()
.reference(withPath: "My_Path")
.child("My_Inner_Path")
.observeSingleEvent(of: .value) { (snapshot) in
// Callback with data at the observing node.
}
But the above code doesn't get called back if the node is empty, or doesn't exist yet. I need to do this so that I can hide my indicator and show zero state or trigger some other methods for no data at node state. Thanks in advance.