It seems that the url_launcher lib creates an intent with the "VIEW" action in Android which is not the way a mailto request should normally be handled.
Maybe this is the reason why the Yahoo mail client does not work in this case.
Usually a "SENDTO" action is required.
You can use the android_intent_plus package to create your own intent:
Future<bool> _createMailUsingAndroidIntent() async {
const intent = AndroidIntent(
action: 'android.intent.action.SENDTO',
data: 'mailto:test@example.com',
);
try {
await intent.launch();
return true;
} on PlatformException catch (_) {
return false;
}
}
Of course this is only needed for Android, for iOS you can use the url_launcher lib.