mailto:<email address>?subject=<subject>&body=<body>
This one creates an email. I want to just open the Gmail app (inbox) with url_launcher package. Is it possible?
You can simple use
launch("https://mail.google.com/mail/u/0/#inbox")
This will open the inbox
You can use external dependency to open any app or playstore directly.
currently launch() is deprecated, instead use launchUrl(). below _inputController is text field controller
final Uri params = Uri(
scheme: 'mailto',
path: 'abcd@gmail.com',
query: 'subject=emails&body=${_inputController.text}',
);
final url = params.toString();
final urlPath = Uri.parse(url);
launchUrl(urlPath);
Yes, it is possible with the url_launcher
package.
To open the gmail app (inbox) with pre-filled mailto, subject and body, you can do something like this:
final Uri params = Uri(
scheme: 'mailto',
path: 'mailto@gmail.com',
query: 'subject=This is the subject&body=this is body',
);
final url = params.toString();
launch(url);