Home > Mobile >  How to launch messages app and set the "To" field (the destination) with default email add
How to launch messages app and set the "To" field (the destination) with default email add

Time:11-05

When the user taps on "contact us" button, I want to launch messages app in both Android and iOS and then set the destination with an already known email address in flutter. How can I do this? Impossible?

CodePudding user response:

You can use url_launcher for opening url's which in your case would be the following:

final url = 'mailto:$mailAddress';
if (await canLaunch(url)) {    
  launch(url);
}
  • Related