I try to experience Firebase Live database with flutter. I just would like to get a value in the datasnapshot of the firebase response.
2 Answers
For this you will want to use a FirebaseAnimatedList. All you have to do is pass in is the reference to your database then you can access your data using snapshot.value.
return FirebaseAnimatedList(
query: FirebaseDatabase.instance.reference().child('users/' + user.uid),
itemBuilder: (context, snapshot, animation, index) {
return Row(children: <Widget>[
Text(
snapshot.value['source'],
style: TextStyle(fontSize: 13.0),
),
]);
});