busca la ciudad
This commit is contained in:
@@ -226,9 +226,25 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
if (_coordsOfCity == '0.0,0.0') {
|
if (_coordsOfCity == '0.0,0.0') {
|
||||||
AuthenticationRepository.instance
|
AuthenticationRepository.instance
|
||||||
.getCoordsOfCity(uid.toString())
|
.getCoordsOfCity(uid.toString())
|
||||||
.then((String s) => setState(() {
|
.then((String s) {
|
||||||
_coordsOfCity = 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();
|
_saveToken();
|
||||||
|
|||||||
Reference in New Issue
Block a user