This is how my data is saved inside LiveTracker there is 2,8 which are bus route id and inside it there is auto generated firebase id and inside that id there is latitude and longitude and i wanna access those latitude and longitude but i am stuck at here and dont know how to fetch that data need soo help
This is my data format which i get when i print data
{-NCQE5NU7ajW2L57gt1o: {latitude: -122.07730612330596, longitude: 37.41749912586621}, -NCQF6O3vx2NYVdZKD0X: {latitude: -122.083922, longitude: 37.4214938}, -NCQF6kWJPOyLuymJeXz: {latitude: -122.07730453282453, longitude: 37.417496832888055}, -NCQF5afZXRqg1Heb9Oq: {latitude: -122.07730562660478, longitude: 37.417495975114676}, -NCQDoU67-ZjN4kNEyPr: {latitude: -122.07730474508638, longitude: 37.41749751091001},
this is how i am trying to fetch that latitude and longitude but i am stuck and dont know how to get it
_dbReference?.child("LiveTracker").child(passedId.toString()).onValue.listen((event) {
var data = event.snapshot.value;
print("This is data $data");
/* _markers.add(Marker(
markerId: MarkerId(DateTime.now().toIso8601String()),
position: LatLng(double.parse(event.snapshot.value.toString()),
double.parse(event.snapshot.value.toString()))));*/
});
