FirebaseList constructor
FirebaseList({
- required Query query,
- ChildCallback? onChildAdded,
- ChildCallback? onChildRemoved,
- ChildCallback? onChildChanged,
- ChildMovedCallback? onChildMoved,
- ValueCallback? onValue,
- ErrorCallback? onError,
Implementation
FirebaseList({
required this.query,
this.onChildAdded,
this.onChildRemoved,
this.onChildChanged,
this.onChildMoved,
this.onValue,
this.onError,
}) {
if (onChildAdded != null) {
listen(query.onChildAdded, _onChildAdded, onError: _onError);
}
if (onChildRemoved != null) {
listen(query.onChildRemoved, _onChildRemoved, onError: _onError);
}
if (onChildChanged != null) {
listen(query.onChildChanged, _onChildChanged, onError: _onError);
}
if (onChildMoved != null) {
listen(query.onChildMoved, _onChildMoved, onError: _onError);
}
if (onValue != null) {
listen(query.onValue, _onValue, onError: _onError);
}
}