launchEmail static method
dynamic
launchEmail(
- dynamic email, {
- LaunchMode mode = LaunchMode.platformDefault,
Launch email app with given email.
Implementation
static launchEmail(email,
{LaunchMode mode = LaunchMode.platformDefault}) async {
if (await canLaunchUrlString("mailto:$email")) {
await launchUrlString(
"mailto:$email",
mode: mode,
);
} else {
showErrorNotice("Error", "Could not launch the $email email");
throw 'Could not launch';
}
}