open_mail
1.2.1, released a year ago by cuboidinc.com
Query device for installed email apps and open them programmatically.
What it does
A Flutter plugin that queries the device for installed email apps and allows users to open a specific email app or view a picker list. It extends functionality beyond default url_launcher capabilities by letting users choose non-default mail applications.
AI-written summary of version 1.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to let users choose which specific email app to open on their device.
- You need to query the list of installed email apps on Android or iOS.
Skip it when
- You only need to open a generic mailto link with the default system mail app.
Strengths
- Supports identifying multiple installed email apps on Android and iOS.
- Allows opening specific mail apps by name.
Weaknesses
- Requires manual configuration of LSApplicationQueriesSchemes in iOS Info.plist for app detection.
- Breaking changes occurred between minor versions (e.g., removal of built-in picker dialog in v1.2.0).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
For iOS, list the URL schemes of the email apps you want to query in your Info.plist file under LSApplicationQueriesSchemes. No additional setup is required for Android.
import 'package:flutter/material.dart';
import 'package:open_mail/open_mail.dart';
void main() {
runApp(const MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Open Mail App Example'),
),
body: Center(
child: ElevatedButton(
onPressed: () async {
final result = await OpenMail.openMailApp();
if (!result.didOpen) {
// Handle no mail apps found
}
},
child: const Text("Open Mail App"),
),
),
);
}
}Alternatives
Packages that do the same job and could replace open_mail.
- open_mail_launcher
Open email applications and compose pre-filled emails on Android and iOS.
71Compare - open_mail_app_plus
Query device for installed email apps and open them or present a picker.
54Compare - app_launcher
Launches an installed Android app by its package ID, falling back to Google Play if missing.
46Compare - auto_orientation_v2
Programmatically control device orientation on iOS, Android, and Web.
72Compare
Works with
Packages commonly used together with open_mail: ones it builds on, ones built on it, and its own family.