mail_to_native 0.8.1
mail_to_native: ^0.8.1 copied to clipboard
Pick an installed mail app and open its compose screen with subject and body prefilled.
0.1.0 #
- Initial release.
MailTo.installedApps()— mail apps installed on the device.MailTo.compose()— open a mail app's compose screen prefilled.MailTo.pickApp()/MailTo.pickAndCompose()— native picker dialog (UIAlertControlleron iOS,AlertDialogon Android).- Apple Mail composes through
MFMailComposeViewController, so it is not hijacked by whichever app owns themailto:scheme.
0.1.1 #
- Added Mail.ru to the iOS client list (scheme
mailru-mail, unverified — see README). Android detects it automatically. - Fixed per-client compose query keys: Spark takes
recipient, Airmail takesplainBody. Both previously receivedto/bodyand dropped them.
0.2.0 #
pickApp/pickAndComposenow show a native one-button alert when no mail app is installed, so callers need no empty-list branch. New optionalemptyMessage,okLabelandshowEmptyAlertparameters.pickAndComposeno longer short-circuits on an empty list — it hands the case to the platform dialog.
0.3.0 #
- Redesigned the Android picker: a rounded bottom sheet with a drag handle and
each app's launcher icon, replacing the plain
AlertDialoglist. Follows the system light/dark setting. Drawn programmatically — no Material dependency and no requirement on the host activity's theme. - The "no mail app" state now uses the same sheet instead of a separate dialog.
cancelLabelis documented as iOS-only; the Android sheet dismisses by scrim tap or back press.
0.4.0 #
- The Android picker is now a centred dialog instead of a bottom sheet,
matching the iOS
.alertpicker. Rounded on all corners, no drag handle, width capped at 400dp. Icons, ripple rows and dark-mode support unchanged.
0.5.0 #
- The picker no longer auto-selects when a single mail app is installed — the dialog always appears, so the new "other apps" entry stays reachable.
- Added an "other apps" entry to the picker and to the "no mail app" dialog. It
opens the system share sheet:
UIActivityViewControlleron iOS (subject carried through aUIActivityItemSource), anACTION_SENDchooser on Android. NewotherAppsLabelandshowOtherAppsparameters. - Added
MailTo.share(message)for calling the share sheet directly, andMailApp.isOther/MailApp.otherAppsIdto identify the entry. - The Android "no mail app" dialog now has proper OK / "other apps" buttons.
0.6.0 #
- Added
ShareMetadata— fills the share sheet's header viaLPLinkMetadataon iOS: icon, bold title, grey subtitle. Without it iOS shows a bare app icon and no title, since a plain text item carries no preview. - The header icon defaults to the host app's own icon, read from
CFBundleIcons; override it with PNG/JPEG bytes. MailTo.sharetakesmetadata:,MailTo.pickAndComposetakesshareMetadata:.- Android sets the chooser's
EXTRA_TITLEfrom the same title; subtitle and icon are iOS-only.
0.7.0 #
ShareMetadata.image— PNG bytes shared as a picture alongside the text. iOS adds it as a second activity item (mail attachment, photo in messengers); Android switches the chooser toimage/pngand serves the file through the plugin's ownFileProvider, so host apps need no manifest change.- The picture doubles as the sheet's preview thumbnail unless
iconoverrides.
0.7.1 #
- Fixed the share-sheet header icon rendering inset inside a white tile. The
plugin no longer loads the host app's icon itself — with no
iconProviderset, iOS draws that icon full-bleed on its own. PassShareMetadata.icononly to override it deliberately.
0.7.2 #
- Fixed the header showing a generic document glyph instead of the app icon.
LPLinkMetadata.originalURL— the only way to render a subtitle — makes iOS treat the item as a file, so the subtitle is now skipped unlessiconorimagesupplies artwork to go with it.
0.8.0 #
- README: pub/license/platform badges, a demo table, a platform-support table and an installation snippet.
- Example app rebuilt as a single compose screen — subject and body fields with
live counters, and a send button that runs
MailTo.pickAndCompose.
0.8.1 #
- Widened the Dart SDK constraint to
>=3.8.0 <4.0.0(was^3.12.2), so the package installs on Flutter 3.32 and newer.