I am trying to return location values with StreamBuilder, but I have not been successful. In debug, he doesn't even run the builder. I can't find the problem.
Here I create StreamBuilder, to bring the location
_newMoveToApoio(String uidProp) { StreamBuilder( stream: Firestore.instance .collection('tracker') .document(uidProp) .snapshots(), builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return new Center( child: CircularProgressIndicator(), ); } else { var trackerDocument = snapshot.data; double latitude = trackerDocument['latitude']; double longitude = trackerDocument['longitude']; _controller.animateCamera(CameraUpdate.newCameraPosition( CameraPosition( target: LatLng(latitude, longitude), zoom: 18.0))); setState(() { _markers.add( Marker( draggable: false, markerId: MarkerId("1"), position: LatLng(latitude, longitude), infoWindow: InfoWindow( title: "João Marcelo", snippet: "Sua Localização Atual"), icon: _markerIconApoio, ), ); }); } }); } Here I make the call in a bottomsheet, passing the 'uid'
onTap: () => _newMoveToApoio(snapshot.data[index].data['uidProp']),