wa.me
parent
226fd7e413
commit
a80eb5874f
|
|
@ -152,11 +152,12 @@ class _MyFloatingActionButtonState extends State<MyFloatingActionButton> {
|
||||||
@required String message,
|
@required String message,
|
||||||
}) async {
|
}) async {
|
||||||
String url() {
|
String url() {
|
||||||
if (Platform.isIOS) {
|
return "whatsapp://send?phone=$phone&text=$message";
|
||||||
return "whatsapp://wa.me/$phone/?text=$message";
|
// if (Platform.isIOS) {
|
||||||
} else {
|
// return "whatsapp://wa.me/$phone/?text=$message";
|
||||||
return "whatsapp://send?phone=$phone&text=$message";
|
// } else {
|
||||||
}
|
// return "whatsapp://send?phone=$phone&text=$message";
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await canLaunch(url())) {
|
if (await canLaunch(url())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue