flutter_email_sender
flutter_email_sender copied to clipboard
FlutterEmailSender.send(email) does not return to my app
I have this button:
FloatingActionButton(
child: Text( 'Send'),
onPressed: () async {
emailAddr = myController.text.trim();
...
String platformResponse;
try {
await FlutterEmailSender.send(email);
platformResponse = 'Email has been sent.';
} catch (error) {
platformResponse = error.toString();
}
Scaffold.of(context).showSnackBar(SnackBar(
backgroundColor: Colors.green,
content: Text(platformResponse)));
}
},
);
This takes me to the Gmail write screen. If I tap the Gmail send icon, all is well - the email is sent, I am returned to my app and the snackbar is shown. But if I choose not to send the email after all and press the back-arrow in the app bar on the Gmail write screen, I am returned to the Gmail inbox and there is no way to get back to my app.
The problem only occurs if Gmail is the default email app. With the Samsung Email app, there is no problem.
Using Flutter 1.20.2 • channel beta and flutter_email_sender: ^3.0.1.
I have the same problem. Any ideas?
@rlfolden There is a new version of the plugin - 4.0.0. I haven't tried it. Have you?