onValue property
Stream<DatabaseEvent>
get
onValue
The value of the query: its current data first, then again after every change. An empty
location gives a first event whose snapshot has exists false. While offline the first event
comes from data the client already holds, else it waits for the server; the loss of the
connection is not an error of the stream (see FirebaseDatabase.onConnected). Read the
children in the query's order from DataSnapshot.children, not from the value map.
Each access returns a new multi-listener stream (isBroadcast is false, but it can be listened to
any number of times); every listener makes its own listen on the server. A new listener gets the current
value first, but not earlier events. The stream ends with done when the database is closed.
Implementation
Stream<DatabaseEvent> get onValue => _stream(<EventType>{EventType.value});