0

I try to experience Firebase Live database with flutter. I just would like to get a value in the datasnapshot of the firebase response.

1
  • 4
    Please post the code and explain where you're stuck. Commented Jul 25, 2018 at 6:21

2 Answers 2

2

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),
        ),
      ]);
    });
Sign up to request clarification or add additional context in comments.

Comments

1

Check this example application in Flutter's Firebase Database plugin.

1 Comment

link no longer available

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.