mail static method

Future<bool> mail({
  1. String toAddress = "",
  2. String subject = "",
  3. String body = "",
  4. OpenMode mode = OpenMode.platformDefault,
})

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.parse("mailto:$toAddress?subject=$subject&body=$body"),
        mode: _getLaunchMode(mode));
  } catch (e) {
    return false;
  }
}