busca la ciudad
This commit is contained in:
@@ -226,9 +226,25 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
if (_coordsOfCity == '0.0,0.0') {
|
||||
AuthenticationRepository.instance
|
||||
.getCoordsOfCity(uid.toString())
|
||||
.then((String s) => setState(() {
|
||||
_coordsOfCity = s;
|
||||
}));
|
||||
.then((String s) {
|
||||
setState(() {
|
||||
_coordsOfCity = s;
|
||||
});
|
||||
|
||||
if (_coordsOfCity != '0.0,0.0') {
|
||||
List<String> coords = _coordsOfCity.split(',');
|
||||
double lat = double.parse(coords[0]);
|
||||
double lng = double.parse(coords[1]);
|
||||
|
||||
// Asegúrate de que googleMapController esté disponible y no sea nulo
|
||||
googleMapController.moveCamera(
|
||||
CameraUpdate.newLatLngZoom(
|
||||
LatLng(lat, lng),
|
||||
14.4746, // Puedes ajustar el nivel de zoom según tus necesidades
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_saveToken();
|
||||
|
||||
Reference in New Issue
Block a user