launchEmail function

Future<void> launchEmail(
  1. String recipients, {
  2. String bcc = '',
  3. String subject = '',
  4. String body = '',
  5. bool showError = false,
})

Implementation

Future<void> launchEmail(String recipients,
    {String bcc = '',
    String subject = '',
    String body = '',
    bool showError = false}) async {
  return safeLaunchUrl(
      'mailto:$recipients?bcc=$bcc&body=${Uri.encodeComponent(body)}&subject=${Uri.encodeComponent(subject)}',
      showError: showError,
      defaultErrorText: 'No email client found');
}