при печати URL-адреса, который я получаю с помощью этой функции:
/>
Код: Выделить всё
https://www.google.com/maps/search/?api=1&query=9.5191017,8.1450133
Код: Выделить всё
https://www.google.com/maps/search/?api=1
Код: Выделить всё
_launchURL() async {
var phonenumber = numberphone.substring(1,10);
var url = 'https://wa.me/+972$phonenumber?text=$textToSend';
print(url);
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
Код: Выделить всё
onPressed: () async{
Position position = await getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
textToSend='https://www.google.com/maps/search/?api=1&query=${position.latitude},${position.longitude}'.toString() ;
_launchURL();
}
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/643 ... app-number