Reputation: 59
I'm trying to retrieve all data from realtime database with multiple children in flutter
How do I retrieve all data. That is both accommodation and products?
This is how I fetch for them individually:
http.get(
'https://flutter-buy.firebaseio.com/products.json?auth=${_authenticatedUser.token}')
I tried this but did not work:
http.get(
'https://flutter-buy.firebaseio.com.json?auth=${_authenticatedUser.token}')
Upvotes: 0
Views: 986
Reputation: 3493
Have you tried without specifying products or accommodation nodes in the request, like below (notice the .json
):
http.get( 'https://flutter-buy.firebaseio.com/.json?auth=${_authenticatedUser.token}')
It seems like it is possible looking at their documentation.
Upvotes: 2