mail static method
share content to mail
Implementation
static Future<bool> mail({
String toAddress = "",
String subject = "",
String body = "",
OpenMode mode = OpenMode.platformDefault,
}) async {
try {
return await launchUrl(
Uri(
scheme: 'mailto',
path: toAddress,
query: _encodeQueryParameters(<String, String>{
'subject': subject,
'body': body,
}),
),
mode: _getLaunchMode(mode),
);
} catch (e) {
log(e.toString());
return false;
}
}