Package selection guidance compiled from public package information, community data, and project usage.
The intent package is a straightforward Flutter plugin designed to simplify Android Intent handling. It enables seamless communication between Flutter apps and native Android components, allowing developers to launch activities, send broadcasts, and manage intents with minimal code. Ideal for sharing data, opening external apps, or triggering system actions like sending emails or messages. The plugin abstracts Android's complex Intent API into easy-to-use Dart methods, making it accessible even for beginners. With clear documentation and active maintenance, it serves as a reliable bridge between Flutter and Android’s native functionality.
Use cases
Sharing content between apps
Launching external applications
Sending broadcast intents
Opening system settings
Handling deep links
Triggering device actions
Key features
Simple Dart interface for Android Intents
Supports implicit and explicit intents
Easy integration with Flutter workflows
Minimal boilerplate code
Active GitHub repository
Clear documentation
Suitable for
Flutter developers targeting Android
Apps needing Android-specific actions
Sharing and deep linking features
Beginners learning Android integration
Considerations
Android-only functionality
Limited to Android platform
Requires Android SDK knowledge for advanced use
No iOS support
May need additional permissions for certain intents
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Warning I've stopped maintaining this project !
intent
A simple flutter plugin to deal with Android Intents - your one stop solution for Android Intents, written with :heart:.
Show some :heart: by putting :star:
intent tries to help you in launching another android activity using Android Intents. This Dart API replicates Android Intent API, so for detailed information on how to use it efficiently, when to send what kind of data, you may be interested in taking a look here, which explains things more elaborately.
intent is your one stop solution for handling different Android Intents from Flutter app.
It provides an easy to use Dart API, which can be used to launch different kind of Android Activities
You can view / create documents
Pick document(s) from Document Tree
Open default Assist Activity
Perform a Web Search
Request definition of a certain string to default Assist Activity
Open image for editing / viewing
Share text / multimedia to another activity
Send Email to specific user, while also setting CC & BCC
Share multiple documents at a time
Sync system content
Translate text
Set Wallpaper
Open any URL
Open Dialer for calling a specific number
Can pick a contact from your default phone activity
Can capture a photo using default Camera Activity
latest addition
Newest Addition: You can pass extra data's type information, while invoking Intent.putExtra(String extra, dynamic data, {String type}) as optional named param type. You don't even need to hardcode type names as Strings, rather a class named TypedExtra has been given to developers, which has all currently supported type names as static variables. Consider using them. And last but not least, this is not a breaking change !!!
But if you're interested in creating a chooser i.e. all eligible candidates shown up system, which can handle this intent, make sure you set createChooser named parameter to true, which is by default false.
Send Email to certain ID while setting Content and CC/ BCC :
Path to captured image can be grabbed from Intent().startActivityForResult().then(() { ... } ), which will be provided in form of List<String>, open file using that path, File(data[0]). Now you can work on that image file.
Intent()
..setAction(Action.ACTION_IMAGE_CAPTURE)
..startActivityForResult().then((data) => print(data[0]), // gets you path to image captured
onError: (e) => print(e));
If you're not interested in showing default activity launch animation, set following flag.
If you request for certain Activity and no eligible candidate was found, you'll receive one error message, which you can listen for using Future.catchError((e) {},) method.
PlatformException(Error, android.content.ActivityNotFoundException: NoActivity found to handle Intent { act=android.intent.action.SYSTEM_TUTORIAL }, null)
Currently a limited number of Actions are provided in Action class, but you can always use a string constant as an Action, which will help you in dealing with many more Activities.