homex-it / open-mail-app-flutter Goto Github PK
View Code? Open in Web Editor NEWThis library provides the ability to query the device for installed email apps and open those apps.
License: MIT License
This library provides the ability to query the device for installed email apps and open those apps.
License: MIT License
Since updating flutter
to the latest available version in the channel beta
we are facing an issue while trying to compile.
flutter doctor -v
[✓] Flutter (Channel beta, 2.9.0-0.1.pre, on macOS 11.4 20F71 darwin-x64, locale en-ES)
• Flutter version 2.9.0-0.1.pre at /Users/nerder/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 8f1f9c10f0 (18 hours ago), 2021-12-14 13:41:48 -0800
• Engine revision 234aca678a
• Dart version 2.16.0 (build 2.16.0-80.1.beta)
• DevTools version 2.9.1
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/121c56a4eb3b9888b3a925c5a1b06c22/jetified-kotlinx-coroutines-android-1.5.2.jar!/META-INF/kotlinx-coroutines-android.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/86ffb183faa2bd338bfefd08560447d3/jetified-kotlin-stdlib-common-1.5.31.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/8cd76d3c199ed7f84af27a672071d60c/jetified-kotlin-stdlib-jdk8-1.5.30.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/9cf3398f5e61cc366c5ee0aa5c3bc390/jetified-kotlin-stdlib-jdk7-1.5.30.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/9d2040e319b51dc246c400f1b2db4972/jetified-window-1.0.0-beta04-api.jar!/META-INF/window_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/ab2037cf9b0bc48dddc9452783f6bf2f/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.gradle/caches/transforms-2/files-2.1/b0053ae52ec47f3a01bcb7033b2bbe63/jetified-window-java-1.0.0-beta04-api.jar!/META-INF/window-java_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (25, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (26, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (27, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (40, 10): Class 'kotlin.jvm.JvmStatic' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/jvm/JvmStatic.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (44, 21): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (45, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (50, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (54, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (56, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (57, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (59, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (60, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (62, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (63, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (65, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (66, 16): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (69, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (71, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (76, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (84, 38): Unresolved reference: isNotEmpty
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (86, 66): Unresolved reference: first
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (91, 37): Unresolved reference: mutableListOf
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (92, 25): Unresolved reference: until
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (95, 72): Unresolved reference: let
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (95, 78): Cannot infer a type for this parameter. Please specify it explicitly.
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (109, 32): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (118, 77): Unresolved reference: java
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (122, 38): Unresolved reference: isNotEmpty
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (123, 91): Unresolved reference: apply
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (124, 17): Unresolved reference: data
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (125, 17): Unresolved reference: type
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (126, 17): Unresolved reference: setClassName
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (126, 55): Unresolved reference: first
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (126, 114): Unresolved reference: first
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (128, 17): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (129, 17): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (130, 17): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (131, 17): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (132, 17): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (135, 41): Unresolved reference: mutableListOf
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (136, 25): Unresolved reference: until
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (141, 62): Unresolved reference: apply
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (142, 37): Unresolved reference: data
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (143, 37): Unresolved reference: type
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (144, 37): Unresolved reference: setClassName
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (145, 37): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (146, 37): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (147, 37): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (148, 37): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (149, 37): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (161, 32): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (173, 62): Unresolved reference: firstOrNull
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (174, 13): Unresolved reference: it
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (181, 26): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (182, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (188, 77): Unresolved reference: java
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (192, 62): Unresolved reference: firstOrNull
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (193, 13): Unresolved reference: it
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (196, 63): Unresolved reference: apply
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (197, 13): Unresolved reference: data
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (198, 13): Unresolved reference: type
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (199, 13): Unresolved reference: setClassName
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (200, 13): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (201, 13): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (202, 13): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (203, 13): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (204, 13): Unresolved reference: putExtra
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (208, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
The class is loaded from /Users/nerder/.gradle/caches/transforms-2/files-2.1/246d7067bcc442dabda444cac586ac0f/jetified-kotlin-stdlib-1.5.31.jar!/kotlin/Unit.class
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (218, 45): Unresolved reference: isNotEmpty
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (219, 28): Unresolved reference: mutableListOf
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (220, 25): Unresolved reference: until
e: /Users/nerder/.pub-cache/hosted/pub.dartlang.org/open_mail_app-0.3.0/android/src/main/kotlin/com/homex/open_mail_app/OpenMailAppPlugin.kt: (226, 13): Unresolved reference: emptyList
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':open_mail_app:compileDebugKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 55s
[!] Your project requires a newer version of the Kotlin Gradle plugin.
Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update /Users/nerder/Developments/strive/checkin/android/build.gradle:
ext.kotlin_version = '<latest-version>'
Exception: Gradle task assembleDevDebug failed with exit code 1
A message is displayed that no email application was not found.
The value of result.didOpen
is false
and Result.canOpen
is false
.
getMailApps()
- result's length is 0.
But the gmail app is installed. And even links like mailto:
from browser open in the gmail app.
Tested on Android 10, and Android 11.
flutter doctor
result:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.19042.630], locale ru-RU)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (not installed)
[!] VS Code (version 1.51.0)
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (1 available)
Very handy plugin and working quite well, but I've tried adding new-lines (\n
) in the body
but they are ignored.
Am I doing something wrong here?
Error using dependency in Flutter v 2.0.1
ERROR:
Because open_mail_app >=0.0.3 <0.1.0-nullsafety.0 depends on url_launcher ^5.5.0 and wallet_app depends on url_launcher ^6.0.2, open_mail_app >=0.0.3 <0.1.0-nullsafety.0 is forbidden.
So, because wallet_app depends on open_mail_app ^0.0.8, version solving failed.
pub get failed (1; So, because wallet_app depends on open_mail_app ^0.0.8, version solving failed.)
The latest version on pub.dev (0.4.4) breaks my build:
../../../../.pub-cache/hosted/pub.dartlang.org/platform-3.0.2/lib/src/interface/local_platform.dart:46:19: Error: Member not found: 'packageRoot'.
io.Platform.packageRoot; // ignore: deprecated_member_use
^^^^^^^^^^^
> fvm flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on macOS 11.3.1 20E241 darwin-x64, locale en-IL)
Dear author,
Thanks for your nice plugin. However, I wonder whether this plugin can support the attachment given in the parameters.
Thanks!
It will be nice to have the possibility to add a title to the app chooser for Android devices
Support for the email app Hey
Thankyou for awesome package.
I am facing a small problem trying to edit mail picker Title text from 'Choose Mail App' to some other text in IOS.(in android it does not get displayed) .
I have tried to edit by changing text of
await OpenMailApp.composeNewEmailInMailApp(
nativePickerTitle: 'Some other title',
emailContent: email);
It would be great if you could help changing the title.
It's a great useful library, but why not adding support for recipients, subject, etc.?
I tried to execute the Example that you had added in the below location
https://pub.dev/packages/open_mail_app/example.
I tried implementing the OpenMailApp in my new flutter project. But every time I get the below error
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method composeNewEmailInMailApp on channel open_mail_app)
That is available on iOS devices.
Test Andriod version : 12、11、10
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-arm, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (5 available)
[✓] HTTP Host Availability
nativePickerTitle: 'Select email app to open' is not showing on Android - a slider comes out with mail apps, but no title anywhere.
Any thoughts how to fix it so the title would show?
Using latest version 0.4.5
The showDialog
function has changed in Flutter. (See https://api.flutter.dev/flutter/material/showDialog.html for an updated example).
When a mail app is installed (I've only been able to test on Android), it launches into it just fine. If there's no mail app, I get an error:
E/flutter ( 2814): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4417 pos 12: '_debugIsStaticCallback(routeBuilder)': The provided routeBuilder must be a static function.
package:flutter/…/widgets/navigator.dart:4417
E/flutter ( 2814): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter ( 2814): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter ( 2814): #2 NavigatorState.restorablePush
package:flutter/…/widgets/navigator.dart:4417
E/flutter ( 2814): #3 Screen._openMailApp
package:app/…/screens/xxx.dart:96
E/flutter ( 2814): <asynchronous suspension>
E/flutter ( 2814):
The code is as follows:
Future<void> _openMailApp(BuildContext context) async {
// Android: Will open mail app or show native picker.
// iOS: Will open mail app if single mail app found.
final result = await OpenMailApp.openMailApp();
Route<Object?> _dialogBuilder(BuildContext context, Object? arguments) {
return DialogRoute<void>(
context: context,
builder: (BuildContext context) => MailAppPickerDialog(
mailApps: result.options,
),
);
}
Route<Object?> _showNoMailAppsDialog(
BuildContext context, Object? arguments) {
return DialogRoute<void>(
context: context,
builder: (context) {
return AlertDialog(
title: Text("Open Mail App"),
content: Text("No mail apps installed"),
actions: <Widget>[
PrimaryButton(
title: "OK",
onPressed: () {
Navigator.pop(context);
},
)
],
);
},
);
}
// If no mail apps found, show error
if (!result.didOpen && !result.canOpen) {
Navigator.of(context).restorablePush(_showNoMailAppsDialog);
// iOS: if multiple mail apps found, show dialog to select.
// There is no native intent/default app system in iOS so
// you have to do it yourself.
} else if (!result.didOpen && result.canOpen) {
Navigator.of(context).restorablePush(_dialogBuilder);
}
}
Can you provide updated instructions?
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.0, on Microsoft Windows [Version 10.0.22000.493], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.6)
[√] Android Studio (version 2020.3)
[√] VS Code, 64-bit edition (version 1.64.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
Now that iOS 14 allows you to select your default mail app, will this functionality be added?
On iOS platform :ios, '12.0'
it fails to open mail app with the below logs:
2022-10-25 21:29:39.714746+0000 Runner[21078:1264847] flutter: The Dart VM service is listening on http://127.0.0.1:64543/0RdSJNgK4r8=/ 2022-10-25 21:31:01.858828+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "x-dispatch://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.859949+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "readdle-spark://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.860793+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "airmail://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.861616+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "ms-outlook://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.862326+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "ymail://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.862942+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "fastmail://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.863467+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "superhuman://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" 2022-10-25 21:31:01.863888+0000 Runner[21078:1264517] -canOpenURL: failed for URL: "protonmail://" - error: "This app is not allowed to query for scheme protonmail"
I have already added the URL schemes in my app's Info.plist file
<key>LSApplicationQueriesSchemes</key> <array> <string>googlegmail</string> <string>x-dispatch</string> <string>readdle-spark</string> <string>airmail</string> <string>ms-outlook</string> <string>ymail</string> <string>fastmail</string> <string>superhuman</string> </array>
Also, the documentation stated that They need to be added to both your app's Info.plist and in the source of this library.
Is the later part responsible for this failure, if yes then why the example app doesn't have the url schemes added to the source of this library.
Please, I would appreciate your help on this, thanks
In some cases, you show a dialog, and as one of the actions, you have 'Open mail app', but it looks weird if the first dialog doesn't match the style of "MailAppPickerDialog". The "MailAppPickerDialog" is returning 'SimpleDialog' which looks different from AlertDialog or CupertinoAlertDialog (Please correct me if I'm wrong!). I would appreciate any suggestion that I can fix this; if there isn't any way to work around outside the package, that is great if you consider this in the next update! I really appreciate any help you can provide.
This plugin is exactly what I am looking for however when I try to incorporate it into my app (natively using obj-c) I get the following errors. Any help would be much appreciated.
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements", referenced from:
__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCompatibility51", referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility51_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility51_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCoreImage", referenced from:
__swift_FORCE_LOAD_$_swiftCoreImage_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreImage_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCoreGraphics", referenced from:
__swift_FORCE_LOAD_$_swiftCoreGraphics_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreGraphics_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCoreFoundation", referenced from:
__swift_FORCE_LOAD_$_swiftCoreFoundation_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreFoundation_$_open_mail_app)
"_swift_getInitializedObjCClass", referenced from:
type metadata accessor for __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
type metadata accessor for open_mail_app.SwiftOpenMailAppPlugin in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"__swift_FORCE_LOAD_$_swiftFoundation", referenced from:
__swift_FORCE_LOAD_$_swiftFoundation_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftFoundation_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftMetal", referenced from:
__swift_FORCE_LOAD_$_swiftMetal_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftMetal_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftObjectiveC", referenced from:
__swift_FORCE_LOAD_$_swiftObjectiveC_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftObjectiveC_$_open_mail_app)
"_swift_unknownObjectRetain", referenced from:
@objc static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"_swift_getObjCClassMetadata", referenced from:
type metadata accessor for __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
@objc static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"_swift_getObjCClassFromMetadata", referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"(extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString", referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"__swift_FORCE_LOAD_$_swiftQuartzCore", referenced from:
__swift_FORCE_LOAD_$_swiftQuartzCore_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftQuartzCore_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftDispatch", referenced from:
__swift_FORCE_LOAD_$_swiftDispatch_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftDispatch_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCompatibility50", referenced from:
__swift_FORCE_LOAD_$_swiftCompatibility50_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility50_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftCoreMedia", referenced from:
__swift_FORCE_LOAD_$_swiftCoreMedia_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreMedia_$_open_mail_app)
"_swift_bridgeObjectRelease", referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"__swift_FORCE_LOAD_$_swiftCoreAudio", referenced from:
__swift_FORCE_LOAD_$_swiftCoreAudio_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreAudio_$_open_mail_app)
"__swift_FORCE_LOAD_$_swiftDarwin", referenced from:
__swift_FORCE_LOAD_$_swiftDarwin_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftDarwin_$_open_mail_app)
"_swift_unknownObjectRelease", referenced from:
static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
@objc static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"_swift_getObjectType", referenced from:
static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"__swift_FORCE_LOAD_$_swiftUIKit", referenced from:
__swift_FORCE_LOAD_$_swiftUIKit_$_open_mail_app in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftUIKit_$_open_mail_app)
"value witness table for Builtin.UnknownObject", referenced from:
full type metadata for open_mail_app.SwiftOpenMailAppPlugin in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
"Swift.String.init(_builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.String", referenced from:
static open_mail_app.SwiftOpenMailAppPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libopen_mail_app.a(SwiftOpenMailAppPlugin.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Not really sure where to go from here
You are using Platform.isAndroid and Platform.isIOS in openMailApp (). It is a static property and cannot be simulated in the test. Can you use other platform checks so we can mimic the platform check in openMailApp () while a unit test like FakePlatform?
Hi, I copied the code from here: https://pub.dev/packages/open_mail_app
and it works fine, but among the 3 mail apps that I have installed on my Xiaomi Mi 9T (Android 9 Pie) it also shows me the PayPal app. Do you know why the standard filter could fail?
`RaisedButton(
child: Text("Open Mail App"),
onPressed: () async {
// Android: Will open mail app or show native picker.
// iOS: Will open mail app if single mail app found.
// OpenMailApp.setFilterList(List.of({'paypal'})); // it shows me paypal with or without this line
OpenMailAppResult result = await OpenMailApp.openMailApp();
// If no mail apps found, show error
if (!result.didOpen && !result.canOpen) {
showNoMailAppsDialog(context);
// iOS: if multiple mail apps found, show dialog to select.
// There is no native intent/default app system in iOS so
// you have to do it yourself.
} else if (!result.didOpen && result.canOpen) {
showDialog(
context: context,
builder: (_) {
return MailAppPickerDialog(
mailApps: result.options,
);
},
);
}
},
),`
Thank you and best regards :)
Thank you for this great library.
I am running the library on android 12 without any problems. But when my designer runs the app on android 9, she gets an exception. The device does have Gmail installed on it. I was able to see the exception in Crashlytics. Any one knows the problem ? Here is the exception (code that launches the email client is below):
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Instance of 'ErrorDescription'.
at EmailModalBottomSheet.build.<fn>(build.java:58)
at SetMixin.toList(SetMixin.java)
at EmailModalBottomSheet.build(EmailModalBottomSheet.java:73)
at StatelessElement.build(StatelessElement.java:4827)
at HookElement.build(HookElement.java:416)
at ComponentElement.performRebuild(ComponentElement.java:4754)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at SingleChildRenderObjectElement.mount(SingleChildRenderObjectElement.java:6284)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at Element.updateChild(Element.java:3540)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at ComponentElement._firstBuild(ComponentElement.java:4735)
at StatefulElement._firstBuild(StatefulElement.java:4919)
at ComponentElement.mount(ComponentElement.java:4729)
at Element.inflateWidget(Element.java:3790)
at MultiChildRenderObjectElement.inflateWidget(MultiChildRenderObjectElement.java:6422)
at Element.updateChild(Element.java:3540)
at RenderObjectElement.updateChildren(RenderObjectElement.java:5845)
at MultiChildRenderObjectElement.update(MultiChildRenderObjectElement.java:6445)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at StatefulElement.update(StatefulElement.java:4960)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ProxyElement.update(ProxyElement.java:5108)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ProxyElement.update(ProxyElement.java:5108)
at _InheritedNotifierElement.update(_InheritedNotifierElement.java:111)
at Element.updateChild(Element.java:3501)
at SingleChildRenderObjectElement.update(SingleChildRenderObjectElement.java:6291)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at StatefulElement.update(StatefulElement.java:4960)
at Element.updateChild(Element.java:3501)
at SingleChildRenderObjectElement.update(SingleChildRenderObjectElement.java:6291)
at Element.updateChild(Element.java:3501)
at SingleChildRenderObjectElement.update(SingleChildRenderObjectElement.java:6291)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at Element.rebuild(Element.java:4477)
at ProxyElement.update(ProxyElement.java:5108)
at Element.updateChild(Element.java:3501)
at ComponentElement.performRebuild(ComponentElement.java:4780)
at StatefulElement.performRebuild(StatefulElement.java:4928)
at Element.rebuild(Element.java:4477)
at BuildOwner.buildScope(BuildOwner.java:2659)
at WidgetsBinding.drawFrame(WidgetsBinding.java:882)
at RendererBinding._handlePersistentFrameCallback(RendererBinding.java:363)
at SchedulerBinding._invokeFrameCallback(SchedulerBinding.java:1144)
at SchedulerBinding.handleDrawFrame(SchedulerBinding.java:1081)
at SchedulerBinding._handleDrawFrame(SchedulerBinding.java:995)
Here is the class that launches the email client:
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:oolfa/app_typography.dart';
import 'package:oolfa/widgets/modal_bottom_sheet_header.dart';
import 'package:open_mail_app/open_mail_app.dart';
const supportedEmails = {
'Airmail': 'assets/email_icons/airmail.png',
'Apple Mail': 'assets/email_icons/apple_mail.png',
'Dispatch': 'assets/email_icons/email.png',
'Fastmail': 'assets/email_icons/fastmail.png',
'Gmail': 'assets/email_icons/gmail.png',
'Outlook': 'assets/email_icons/outlook.png',
'ProtonMail': 'assets/email_icons/proton_mail.png',
'Spark': 'assets/email_icons/spark.png',
'Superhuman': 'assets/email_icons/superhuman.png',
'Yahoo': 'assets/email_icons/yahoo.png',
};
class EmailModalBottomSheet extends HookWidget {
final List<MailApp> mailApps;
const EmailModalBottomSheet({required this.mailApps, Key? key})
: super(key: key);
Future show(BuildContext context) {
return showModalBottomSheet(
context: context,
builder: (context) => this,
isScrollControlled: true,
isDismissible: true,
);
}
@override
Widget build(BuildContext context) {
final height = MediaQuery.of(context).size.height;
return SafeArea(
child: ConstrainedBox(
constraints: BoxConstraints.loose(Size.fromHeight(height * .9)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ModalBottomSheetHeader(
title: 'Select mail app',
onLeftIconPressed: () => Navigator.pop(context),
),
Flexible(
fit: FlexFit.loose,
child: ListView(
shrinkWrap: true,
children: mailApps.map(
(MailApp app) {
return ListTile(
leading: Image.asset(
supportedEmails[app.name]!,
width: 24,
height: 24,
),
title: Text(
app.name,
style: AppTypography.subtitle1,
),
onTap: () {
Navigator.pop(context);
OpenMailApp.openSpecificMailApp(app);
},
minLeadingWidth: 26,
);
},
).toList(),
),
),
const SizedBox(height: 16),
],
),
),
);
}
}
On iOS there is problem with composeNewEmailInMailApp() if there is only one App installed. However works perfectly while there are multiple email Apps. I believe it's because of how launchScheme is created.
in the package you have used launch method. but url launcher package has updated. could you please update to use launchUrl method ? thanks
Does seem to do it here, and no prints show after result. Any ideas? Im on Android 8 on samsung s7
Follow https://dart.dev/null-safety/migration-guide
Keep changes on a branch named null-safety
kindly change android/gradle/wrapper/gradle-wrapper.properties - gradle-5.6.2-all.zip to gradle-5.6.4-all.zip
It would be very useful if we could also prefill the email fields to, subject and body when opening the app.
It already works on Android with url_launcher, but such functionality on iOS would be useful.
This package seems quite close to this functionality if it only had prefilling.
This comment shows how it can be done on iOS for at least Gmail:
taljacobson/flutter_mailer#29
I've installed Gmail but _getIosMailApps()
only return the default mail app message://
.
Hello,
The problem is that I can't open the Gmail application from my Samsung S21 (Android version 13) even though the application is well installed on my phone but it works fine on Samsung Galaxy S10e (Android version 12) and it works fine on Samsung OnePlus 6 (Android version 11)
I'm sending you the error logs that I have:
I/flutter (20768): at com.homex.open_mail_app.OpenMailAppPlugin.composeNewEmailInSpecificEmailAppIntent(OpenMailAppPlugin.kt:208) I/flutter (20768): #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:653 I/flutter (20768): #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:296 I/flutter (20768): <asynchronous suspension> I/flutter (20768): #2 OpenMailApp.composeNewEmailInSpecificMailApp package:open_mail_app/open_mail_app.dart:200 I/flutter (20768): <asynchronous suspension>
I hope we will have a correction very soon because I need correction and also your Lib is the best compared to the other Libs which have the same context
Does OpenMailApp support html bodies?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.