A wrapper on top of MFMailComposeViewController from iOS and Mail Intent on android

Overview

flutter_mailer

pub package

Share email content via device Email Client - supports multiple Attachments

Simple & quick plugin for cross application data sharing of email fields in mobile development.

Flutter Mailer example app

Supports:

  • android
  • ios

Getting Started

Add to your pubspec dependencies, like so:

dependencies:
  flutter:
    sdk: flutter
  flutter_mailer: ^2.0.0

Instantiate mail options as follows:

send email

import 'package:flutter_mailer/flutter_mailer.dart';

...
...

final MailOptions mailOptions = MailOptions(
  body: 'a long body for the email <br> with a subset of HTML',
  subject: 'the Email Subject',
  recipients: ['[email protected]'],
  isHTML: true,
  bccRecipients: ['[email protected]'],
  ccRecipients: ['[email protected]'],
  attachments: [ 'path/to/image.png', ],
);

final MailerResponse response = await FlutterMailer.send(mailOptions);
switch (response) {
  case MailerResponse.saved: /// ios only
    platformResponse = 'mail was saved to draft';
    break;
  case MailerResponse.sent: /// ios only
    platformResponse = 'mail was sent';
    break;
  case MailerResponse.cancelled: /// ios only
    platformResponse = 'mail was cancelled';
    break;
  case MailerResponse.android:
    platformResponse = 'intent was successful';
    break;
  default:
    platformResponse = 'unknown';
    break;
}

note gmail and other apps Might parse HTML out of the body.

[Android] check if app is installed.

use full if you want to send the intent to a specific App. returns false on [IOS]

const GMAIL_SCHEMA = 'com.google.android.gm';

final bool gmailinstalled =  await FlutterMailer.isAppInstalled(GMAIL_SCHEMA);

if(gmailinstalled) {
  final MailOptions mailOptions = MailOptions(
    body: 'a long body for the email <br> with a subset of HTML',
    subject: 'the Email Subject',
    recipients: ['[email protected]'],
    isHTML: true,
    bccRecipients: ['[email protected]'],
    ccRecipients: ['[email protected]'],
    attachments: [ 'path/to/image.png', ],
    appSchema: GMAIL_SCHEMA,
  );
  await FlutterMailer.send(mailOptions);
}

[IOS] check if device has the ability to send email

this package uses MFMailComposeViewController for [IOS] which requires the default mail App. if none is installed you might want to revert to use url_launcher returns false on [Android]

  final bool canSend = await FlutterMailer.canSendMail();

  if(!canSend && Platform.isIos) {
    final url = 'mailto:$recipient?body=$body&subject=$subject';
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }
}

For help getting started with Flutter, view official online documentation.

For help on editing plugin code, view the documentation.

based off of react-native-mail

Comments
  • Note: /Users/administrator/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mailer-2.0.0/android/src/main/java/com/dataxad/flutter_mailer/FlutterMailerPlugin.java uses or overrides a deprecated API

    Note: /Users/administrator/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_mailer-2.0.0/android/src/main/java/com/dataxad/flutter_mailer/FlutterMailerPlugin.java uses or overrides a deprecated API

    error message on "flutter build appbundle"

    Because http >=0.13.0 depends on http_parser ^4.0.0 and firebase_auth_web <0.4.0-1.0.nullsafety.0 depends on http_parser ^3.1.3, http >=0.13.0 is incompatible with firebase_auth_web <0.4.0-1.0.nullsafety.0. And because firebase_auth >=0.15.2 <0.17.0-dev.1 depends on firebase_auth_web ^0.1.1, http >=0.13.0 is incompatible with firebase_auth >=0.15.2 <0.17.0-dev.1. So, because easy_list_pro depends on both http ^0.13.0 and firebase_auth ^0.15.3, version solving failed.

    opened by Development4A 9
  • Can't attach a file in application documents directory

    Can't attach a file in application documents directory

    When I try to attach a file in my application documents directory (path "/data/user/0/app.emparent.android/app_flutter/file.db"), I get the error PlatformException (PlatformException(error, Failed to find configured root that contains /data/data/app.emparent.android/app_flutter/file.db, null)). (Note the slight difference in the interpreted path.)

    I'm 100% sure that the path is correct (it's the same path that I use for saving and reading the database, and that works). I'm using getApplicationDocumentsDirectory() from path_provider to get the directory.

    Android 
    opened by 12people 9
  • Unhandled Exception: PlatformException(UNAVAILABLE, default mail app not available, null)

    Unhandled Exception: PlatformException(UNAVAILABLE, default mail app not available, null)

    Hello. While using flutter mailer package in iphone version, I have this issue. [VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: PlatformException(UNAVAILABLE, default mail app not available, null) #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:570:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18) <asynchronous suspension> #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12) #3 FlutterMailer.send (package:flutter_mailer/flutter_mailer.dart:9:21) #4 MailService.sendMailToClient (package:fai_reciept/service/mailservice.dart:18:25) #5 PdfViewerPage.build.<anonymous closure> (package:fai_reciept/billhome.dart:632:37) #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:19) #7 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1095:38) #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24) #9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:522:11) #10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:282:5) #11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:217:7) #12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:475:9) #13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12) #14 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:122:9) #15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8) #16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:120:18) #17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7) #18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19) #19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22) #20 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7) #21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7) #22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7) #23 _rootRunUnary (dart:async/zone.dart:1206:13) #24 _CustomZone.runUnary (dart:async/zone.dart:1100:19) #25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7) #26 _invoke1 (dart:ui/hooks.dart:281:10) #27 _dispatchPointerDataPacket (dart:ui/hooks.dart:190:5)

    I am using xcode version 11.0 (11A420a) Target: iOS11.0 Device: iphone, iPad

    flutter doctor -v `[✓] Flutter (Channel dev, 1.18.0-11.1.pre, on Mac OS X 10.15.5 19F101, locale en-CN) • Flutter version 1.18.0-11.1.pre at /Users/kk/Developer/flutter • Framework revision c2b7342ca4 (3 months ago), 2020-05-06 23:16:03 +0800 • Engine revision e8c13aa012 • Dart version 2.9.0 (build 2.9.0-14.0.dev 5c1376615e)

    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /Users/kk/Library/Android/sdk • Platform android-29, build-tools 29.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS (Xcode 11.0) • Xcode at /Users/kk/Downloads/Xcode.app/Contents/Developer • Xcode 11.0, Build version 11A420a • CocoaPods version 1.9.1

    [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 46.0.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

    [✓] IntelliJ IDEA Ultimate Edition (version 2020.1) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 45.1.3 • Dart plugin version 201.7223.43

    [✓] VS Code (version 1.46.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.12.1

    [✓] Connected device (1 available)
    • iPhone • 00008020-000414A00178002E • ios • iOS 13.5.1 `

    opened by monkeyMax-SVG 7
  • PlatformException when using Fluttermailer.send(...) after flutter upgrade from 1.9 to 1.12

    PlatformException when using Fluttermailer.send(...) after flutter upgrade from 1.9 to 1.12

    Unfortunately, I guess since the update to flutter 1.12.13+hotfix.5, the following PlatformException raises at the FlutterMailer.send(mailOptions) call:

    PlatformException (PlatformException(error, Attempt to invoke virtual method 'void android.app.Activity.startActivityForResult(android.content.Intent, int)' on a null object reference, null))
    

    The complete stack is the following:

    E/flutter ( 6682): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'void android.app.Activity.startActivityForResult(android.content.Intent, int)' on a null object reference, null)
    E/flutter ( 6682): #0      StandardMethodCodec.decodeEnvelope 
    package:flutter/…/services/message_codecs.dart:569
    E/flutter ( 6682): #1      MethodChannel.invokeMethod 
    package:flutter/…/services/platform_channel.dart:321
    E/flutter ( 6682): <asynchronous suspension>
    E/flutter ( 6682): #2      FlutterMailer.send 
    package:flutter_mailer/flutter_mailer.dart:9
    E/flutter ( 6682): #3      Mailer.emailIt.<anonymous closure> 
    package:my_app/services/mailer.dart:67
    E/flutter ( 6682): <asynchronous suspension>
    E/flutter ( 6682): #4      _rootRunUnary  (dart:async/zone.dart:1134:38)
    E/flutter ( 6682): #5      _CustomZone.runUnary  (dart:async/zone.dart:1031:19)
    E/flutter ( 6682): #6      _FutureListener.handleValue  (dart:async/future_impl.dart:139:18)
    E/flutter ( 6682): #7      Future._propagateToListeners.handleValueCallback  (dart:async/future_impl.dart:680:45)
    E/flutter ( 6682): #8      Future._propagateToListeners  (dart:async/future_impl.dart:709:32)
    E/flutter ( 6682): #9      Future._completeWithValue  (dart:async/future_impl.dart:524:5)
    E/flutter ( 6682): #10     Future._asyncComplete.<anonymous closure>  (dart:async/future_impl.dart:554:7)
    E/flutter ( 6682): #11     _rootRun  (dart:async/zone.dart:1126:13)
    E/flutter ( 6682): #12     _CustomZone.run  (dart:async/zone.dart:1023:19)
    E/flutter ( 6682): #13     _CustomZone.runGuarded  (dart:async/zone.dart:925:7)
    E/flutter ( 6682): #14     _CustomZone.bindCallbackGuarded.<anonymous closure>  (dart:async/zone.dart:965:23)
    E/flutter ( 6682): #15     _microtaskLoop  (dart:async/schedule_microtask.dart:43:21)
    E/flutter ( 6682): #16     _startMicrotaskLoop  (dart:async/schedule_microtask.dart:52:5)
    

    The versions I am using are:

    • Flutter v1.12.13+hotfix.5
    • flutter_mailer 0.4.2

    Unfortunately I have no idea what broke here and how to solve it. I did not change application code and prior to the flutter update, it worked. Do you have any idea?

    bug Android 
    opened by sceee 7
  • For iOS, don't return the feedback MFMailComposeResult result

    For iOS, don't return the feedback MFMailComposeResult result

    Hi,

    For iOS, in the MFMailComposeViewControllerDelegate, you don't return the feedback MFMailComposeResult result. It could be easily by keep the result:(FlutterResult)result in a variable and call it in the MFMailComposeViewControllerDelegate method.

    IOS 
    opened by herveperoteau 6
  • How to attach asset files?

    How to attach asset files?

    I need to attach assets file for the attachment. Suppose I have a file "test.doc" in my assets/doc folder. I tried by adding provider in manifest file but failed. I am getting the following error: java.lang.IllegalArgumentException: Failed to find configured root that contains

    opened by shariful2011 3
  • MissingPluginException(No implementation found for method send on channel flutter_mailer)

    MissingPluginException(No implementation found for method send on channel flutter_mailer)

    Hi, I got this exception MissingPluginException(No implementation found for method send on channel flutter_mailer)

    appreciate if you could assist me. Thanks

    question 
    opened by fatahzull 2
  • Flutter mailer issue in android

    Flutter mailer issue in android

    Hello. I wanted to send email to other person in flutter so I was using flutter_mailer package for this. I was thinking code has no issue but when I try to send email. i had issue like this. please help me.

    E/Flutter_mailer Size==1( 4356): Attempt to invoke virtual method 'void android.app.Activity.startActivityForResult(android.content.Intent, int)' on a null object reference
    E/flutter ( 4356): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'void android.app.Activity.startActivityForResult(android.content.Intent, int)' on a null object reference, null)
    E/flutter ( 4356): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
    E/flutter ( 4356): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
    E/flutter ( 4356): <asynchronous suspension>
    E/flutter ( 4356): #2      FlutterMailer.send (package:flutter_mailer/flutter_mailer.dart:9:21)
    E/flutter ( 4356): #3      MailService.sendMailToClient (package:billsender/service/mailservice.dart:16:25)
    

    This is my flutter doctor -v

    Flutter (Channel dev, v1.16.4-pre.132, on Mac OS X 10.15.4 19E287, locale
        en-CN)
        • Flutter version 1.16.4-pre.132 at /Users/kk/Developer/flutter
        • Framework revision 727552e5ca (4 weeks ago), 2020-04-06 13:38:41 -0700
        • Engine revision e1e6ced81d
        • Dart version 2.7.0
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/kk/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling
          support)
        • Platform android-29, build-tools 29.0.3
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_202-release-1483-b49-5587405)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.0)
        • Xcode at /Users/kk/Downloads/Xcode.app/Contents/Developer
        • Xcode 11.0, Build version 11A420a
        • CocoaPods version 1.9.1
    
    [✓] Android Studio (version 3.5)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 44.0.1
        • Dart plugin version 191.8593
        • Java version OpenJDK Runtime Environment (build
          1.8.0_202-release-1483-b49-5587405)
    
    [!] IntelliJ IDEA Ultimate Edition (version 2020.1)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • For information about installing plugins, see
          https://flutter.dev/intellij-setup/#installing-the-plugins
    
    [✓] VS Code (version 1.44.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.10.1
    
    [✓] Connected device (1 available)
    

    This is my script

    import 'package:flutter_mailer/flutter_mailer.dart';
    
    class MailService {
    
      void sendMailToClient(String path) async{
        final MailOptions mailOptions = MailOptions(
          body: 'The new Folder with some bills arrived.',
          subject: 'From Bills App',
          recipients: ['[email protected]'],
          isHTML: true,
          bccRecipients: ['[email protected]'],
          ccRecipients: ['[email protected]'],
    //    attachments: [ 'path/to/image.png', ],
        );
        await FlutterMailer.send(mailOptions);
      }
    }
    
    bug question Android 
    opened by monkeyMax-SVG 2
  • Remove distinction between single and multiple attachments.

    Remove distinction between single and multiple attachments.

    When a user decides to use Google Drive instead of a mail client to open the intent, the subject becomes the file name. This is obviously incorrect because it removes the extension of the file. Removing these lines solves this problem. I'm not sure why they were there.

    opened by robindijkhof 2
  • Attachment path get mangled.

    Attachment path get mangled.

    My storage class returns a path to my file as:

    /data/user/0/...

    Which I pass directly in the attachments property.

    The mail fails with this error:

    PlatformException(error, Failed to find configured root that contains /data/data/...

    Samsung Galaxy S7

    opened by chrislaurie-bs 2
  • migrate to new platform API

    migrate to new platform API

    flutter 1.12 introduced a new platform API for Android and IOS plugins and while the old API that is being used will still work for the foreseeable future we should migrate to it.

    https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration

    while i believe i can migrate the java/Android code, i will need help with the IOS code, since i am not a objective C or swift programmer. and not very familiar with the IOS native environment.

    https://github.com/taljacobson/flutter_mailer/issues/19#issuecomment-573319902

    help wanted IOS 
    opened by taljacobson 2
  • Deprecation warning

    Deprecation warning

    This has been partly reported in #43. However, the core issue was something else there. So, this issue is supposed to be a reminder that the warning still exists since Flutter Embedding v2 should be standard by now.

    The full warning (with source) is the following:

    G:\Programme\Flutter_SDK\.pub-cache\hosted\pub.dartlang.org\flutter_mailer-2.0.1\android\src\main\java\com\dataxad\flutter_mailer\FlutterMailerPlugin.java:22: warning: [deprecation] Registrar in PluginRegistry has been deprecated
        public static void registerWith(PluginRegistry.Registrar registrar) {
                                                      ^
    1 warning
    

    In order to fix this, something like https://github.com/firebase/flutterfire/commit/738b0ec925bff934158fb8cc7e40004d39a1085f should do the trick. Also this guide could potentially be helpful if the plugin has not been fully migrated yet.

    opened by ThexXTURBOXx 0
  • Sharing Intent option mail app as first

    Sharing Intent option mail app as first

    Before selecting the default app, other app sappears such us bluetooth share or WhatsApp and more. I will like to have Gmail or other email clients first. Is it possible? There is an option to add or order apps in sharing intent?

    help wanted good first issue Android 
    opened by adlucio87 2
  • RuntimeException Failure delivering result ResultInfo

    RuntimeException Failure delivering result ResultInfo

    We are getting multiple crashes reports from crashlytics. it looks like the package tries to use the result object after it already emitted a result. Could you add checks to avoid this issue

    Stacktrace

    Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=564, result=0, data=null} to activity {com.bayt/com.baytjs.MainActivity}: java.lang.IllegalStateException: Reply already submitted
           at android.app.ActivityThread.deliverResults(ActivityThread.java:5579)
           at android.app.ActivityThread.handleSendResult(ActivityThread.java:5620)
           at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
           at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
           at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
           at android.os.Handler.dispatchMessage(Handler.java:106)
           at android.os.Looper.loop(Looper.java:246)
           at android.app.ActivityThread.main(ActivityThread.java:8633)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    
    Caused by java.lang.IllegalStateException: Reply already submitted
           at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:164)
           at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:238)
           at com.dataxad.flutter_mailer.MethodCallHandlerImpl.onActivityResult(MethodCallHandlerImpl.java:96)
           at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:741)
           at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:426)
           at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:749)
           at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:651)
           at android.app.Activity.dispatchActivityResult(Activity.java:8550)
           at android.app.ActivityThread.deliverResults(ActivityThread.java:5572)
           at android.app.ActivityThread.handleSendResult(ActivityThread.java:5620)
           at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
           at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
           at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
           at android.os.Handler.dispatchMessage(Handler.java:106)
           at android.os.Looper.loop(Looper.java:246)
           at android.app.ActivityThread.main(ActivityThread.java:8633)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    
    question Android 
    opened by medyas 2
  • Attachments not working: java.lang.ClassCastException: android.text.SpannableStringBuilder cannot be cast to java.util.ArrayList

    Attachments not working: java.lang.ClassCastException: android.text.SpannableStringBuilder cannot be cast to java.util.ArrayList

    Sending attachments broke recently:

    I/ViewRootImpl@477a313[MainActivity](32228): ViewPostIme pointer 1
    I/flutter (32228): /data/user/0/com.pestscope.pestscopemobile/cache117490004--13.pdf
    W/NetworkRequest(32228): No App Check token for request.
    2
    I/System.out(32228): (HTTPLog)-Static: isSBSettingEnabled false
    I/flutter (32228): Bytes loaded:7583132
    W/Bundle  (32228): Key android.intent.extra.TEXT expected ArrayList<CharSequence> but value was a android.text.SpannableStringBuilder.  The default value <null> was returned.
    W/Bundle  (32228): Attempt to cast generated internal exception:
    W/Bundle  (32228): java.lang.ClassCastException: android.text.SpannableStringBuilder cannot be cast to java.util.ArrayList
    W/Bundle  (32228): 	at android.os.BaseBundle.getCharSequenceArrayList(BaseBundle.java:1343)
    W/Bundle  (32228): 	at android.os.Bundle.getCharSequenceArrayList(Bundle.java:1145)
    W/Bundle  (32228): 	at android.content.Intent.getCharSequenceArrayListExtra(Intent.java:9005)
    W/Bundle  (32228): 	at android.content.Intent.migrateExtraStreamToClipData(Intent.java:12041)
    W/Bundle  (32228): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1721)
    W/Bundle  (32228): 	at android.app.Activity.startActivityForResult(Activity.java:5377)
    W/Bundle  (32228): 	at android.app.Activity.startActivityForResult(Activity.java:5335)
    W/Bundle  (32228): 	at com.dataxad.flutter_mailer.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:73)
    W/Bundle  (32228): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
    W/Bundle  (32228): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84)
    W/Bundle  (32228): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865)
    W/Bundle  (32228): 	at android.os.MessageQueue.nativePollOnce(Native Method)
    W/Bundle  (32228): 	at android.os.MessageQueue.next(MessageQueue.java:335)
    W/Bundle  (32228): 	at android.os.Looper.loop(Looper.java:206)
    W/Bundle  (32228): 	at android.app.ActivityThread.main(ActivityThread.java:8595)
    W/Bundle  (32228): 	at java.lang.reflect.Method.invoke(Native Method)
    W/Bundle  (32228): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    W/Bundle  (32228): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    I/ViewRootImpl@477a313[MainActivity](32228): MSG_WINDOW_FOCUS_CHANGED 0 1
    

    traced error to Android 4 bug: https://stackoverflow.com/questions/15776416/java-lang-classcastexception-android-text-spannablestringbuilder-cannot-be-cast

    opened by Mmisiek 5
  • [PPT] Error creating the CFMessagePort needed to communicate with PPT.

    [PPT] Error creating the CFMessagePort needed to communicate with PPT.

    On iOS get the error: [PPT] Error creating the CFMessagePort needed to communicate with PPT. when using FlutterEmailSender.send(email).

    The email window comes up as expected. If I send or cancel the email, then I get the following error stream:

    [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:609 (
    	0   AXRuntime                           0x00000001a5fb2c24 638F11FF-7696-30F3-A29E-8ECB6147567D + 322596
    	1   AXRuntime                           0x00000001a5f685dc _AXGetPortFromCache + 708
    	2   AXRuntime                           0x00000001a5f69cec AXUIElementPerformFencedActionWithValue + 488
    	3   UIKit                               0x00000001f08bdc70 89D9DA59-C6CA-39FF-AF87-AB9019F15DC6 + 932976
    	4   libdispatch.dylib                   0x0000000180ef1c04 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 7172
    	5   libdispatch.dylib                   0x0000000180ef3950 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 14672
    	6   libdispatch.dylib                   0x0000000180efb0ac 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 45228
    	7   libdispatch.dylib                   0x0000000180efbc10 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 48144
    	8   libdispatch.dylib                   0x0000000180f06318 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 90904
    	9   libsystem_pthread.dylib             0x00000001f05b11b0 _pthread_wqthread + 288
    	10  libsystem_pthread.dylib             0x00000001f05b0f50 start_wqthread + 8
    )
    [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:609 (
    	0   AXRuntime                           0x00000001a5fb2c24 638F11FF-7696-30F3-A29E-8ECB6147567D + 322596
    	1   AXRuntime                           0x00000001a5f685dc _AXGetPortFromCache + 708
    	2   AXRuntime                           0x00000001a5f69cec AXUIElementPerformFencedActionWithValue + 488
    	3   UIKit                               0x00000001f08bdc70 89D9DA59-C6CA-39FF-AF87-AB9019F15DC6 + 932976
    	4   libdispatch.dylib                   0x0000000180ef1c04 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 7172
    	5   libdispatch.dylib                   0x0000000180ef3950 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 14672
    	6   libdispatch.dylib                   0x0000000180efb0ac 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 45228
    	7   libdispatch.dylib                   0x0000000180efbc10 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 48144
    	8   libdispatch.dylib                   0x0000000180f06318 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 90904
    	9   libsystem_pthread.dylib             0x00000001f05b11b0 _pthread_wqthread + 288
    	10  libsystem_pthread.dylib             0x00000001f05b0f50 start_wqthread + 8
    )
    [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:609 (
    	0   AXRuntime                           0x00000001a5fb2c24 638F11FF-7696-30F3-A29E-8ECB6147567D + 322596
    	1   AXRuntime                           0x00000001a5f685dc _AXGetPortFromCache + 708
    	2   AXRuntime                           0x00000001a5f69cec AXUIElementPerformFencedActionWithValue + 488
    	3   UIKit                               0x00000001f08bdc70 89D9DA59-C6CA-39FF-AF87-AB9019F15DC6 + 932976
    	4   libdispatch.dylib                   0x0000000180ef1c04 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 7172
    	5   libdispatch.dylib                   0x0000000180ef3950 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 14672
    	6   libdispatch.dylib                   0x0000000180efb0ac 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 45228
    	7   libdispatch.dylib                   0x0000000180efbc10 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 48144
    	8   libdispatch.dylib                   0x0000000180f06318 959CD6E4-0CE7-3022-B73C-8B36F79F4745 + 90904
    	9   libsystem_pthread.dylib             0x00000001f05b11b0 _pthread_wqthread + 288
    	10  libsystem_pthread.dylib             0x00000001f05b0f50 start_wqthread + 8
    )
    

    Here's the flutter doctor -v:

    mfink@MacBook-Pro bin % flutter doctor -v
    [✓] Flutter (Channel stable, 2.5.1, on macOS 11.6 20G165 darwin-arm, locale en-US)
        • Flutter version 2.5.1 at /Users/mfink/Developer/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ffb2ecea52 (4 days ago), 2021-09-17 15:26:33 -0400
        • Engine revision b3af521a05
        • Dart version 2.14.2
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
        • Android SDK at /Users/mfink/Library/Android/sdk
        • Platform android-31, build-tools 31.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 13.0, Build version 13A233
        • CocoaPods version 1.10.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    
    [✓] VS Code (version 1.60.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.26.0
    
    [✓] Connected device (3 available)
        • Martin iPad Pro (mobile) • 00008027-001259C10CF8402E • ios            • iOS 15.0 19A346
        • macOS (desktop)          • macos                     • darwin-arm64   • macOS 11.6 20G165
          darwin-arm
        • Chrome (web)             • chrome                    • web-javascript • Google Chrome
          93.0.4577.82
    
    • No issues found!
    

    is there something I'm doing wrong? Thanks!

    help wanted IOS 
    opened by martin-robert-fink 3
Owner
Tal Jacobson
Self taught programmer. interested in web technologies, JavaScript, Typescript, React, Flutter, Angular, Ionic, Node.
Tal Jacobson
Binding and high-level wrapper on top of libssh - The SSH library!

Dart Binding to libssh version 0.9.6 binding and high-level wrapper on top of libssh - The SSH library! libssh is a multiplatform C library implementi

Isaque Neves 2 Dec 20, 2021
A wrapper on top of alert dialog provided by flutter.

material_dialog A wrapper on top of alert dialog provided by flutter. Demo Use this package as a library 1. Depend on it Add this to your package's pu

Zubair Rehman 28 Aug 8, 2022
A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Ably Flutter Plugin A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers sync

Ably Realtime - our client library SDKs and libraries 46 Dec 13, 2022
Flutter tableview - A flutter widget like iOS UITableview. let listView with section header and each section header will hover at the top.

中文 flutter_tableview A flutter widget like iOS UITableview. let listView with section header and each section header will hover at the top. Installing

null 41 Jul 22, 2022
RoomKit Flutter is a wrapper of Native Android and iOS RoomKit SDK

ZEGOCLOUD RoomKit Flutter RoomKit Flutter is a wrapper of Native Android and iOS RoomKit SDK Getting started Prerequisites Basic requirements Android

null 0 Dec 16, 2022
Prism is a beautiful open-source wallpapers app for Android. It is built with Dart on top of Google's Flutter Framework.

Prism Prism is a beautiful open-source wallpapers app for Android. It is built with Dart on top of Google's Flutter Framework. Prism brings you exclus

Hash Studios 473 Dec 31, 2022
WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

WooSignal 314 Jan 9, 2023
(Top 10 GDG Devfest 2021) Mobile Application to prove intellectual property rights using blockchain technology and NFT

brainshield A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Nguyen Minh Dung 4 Jan 12, 2022
Flutter application for latest news by top newspapers . And allow for share articles with friends. Now available in night mode. Also landscape mode is available

Breaking News Latest news for almost 55 country. Feature of saving article and search ariticles. Used API https://newsapi.org/ Note: if data is not ge

null 7 Oct 24, 2022
Nimbostratus is a reactive data-fetching and client-side cache management library built on top of Cloud Firestore.

Nimbostratus ?? Nimbostratus is a reactive data-fetching and client-side cache management library built on top of Cloud Firestore. The Cloud Firestore

Dan Reynolds 13 Dec 15, 2022
Basic todo mobile application built on top of the ETH blockchain with Flutter, Truffle and Ganache.

Todo-DAPP This project is a basic mobile Todo App build with Flutter. The backend consist in a Solidity contract running on the Ethereum Blockchain. C

Lorenzo Gangemi 2 Sep 28, 2022
Flutter settings manager built on top of Shared Preferences

Settings Manager Flutter settings store built on top of shared preferences. Code Generator for supported types Usage import 'dart:async'; import 'pac

Rody Davis 17 Dec 13, 2022
Aris fltrtuber - Flutter Web App to list top 30 YouTubers who create tutorial on Flutter

Fluttuber - Top 30 Flutter YouTubers Flutter Web App to list top 30 YouTubers wh

Behruz Hurramov 3 Jan 27, 2022
A ListView widget capable of pinning a child to the top of the list.

PinnableListView A Flutter ListView widget that allows pinning a ListView child to the top of the list. Demo Getting Started Define the list PinCont

Jan Hrastnik 2 May 17, 2020
Flutter Tutorial - Scroll To Top In ListView

Flutter Tutorial - Scroll To Top In ListView Let's use Flutter to scroll to the top of a ListView and to detect the current ListView Scroll Position.

null 0 Apr 20, 2022
Display a smart banner on top of the screen of your Flutter Web application.

Smart Banner Display a smart banner on top of the screen of your Flutter Web application. Inspired by smart-app-banner and react-smartbanner Try the o

Guillaume Roux 8 Jul 10, 2023
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 44 Nov 1, 2022
The lightweight and powerful wrapper library for Twitter Ads API written in Dart and Flutter 🐦

TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them. Features TODO: List w

Twitter.dart 2 Aug 26, 2022