Quick Actions in Flutter
As a developer, you can define shortcuts to perform specific actions in your app. These shortcuts can be displayed in a supported launcher and help your users quickly start common or recommended tasks within your app.
Android and IOS both have their specific ways implement these shortcuts. In Android, the term used is App Shortcut whereas IOS calls it as Home Screen Quick Actions.
To achieve this functionality in Flutter you can use a plugin called quick_actions. This Flutter plugin allows you to manage and interact with the application’s home screen quick actions.
Quick actions refer to the eponymous concept on iOS and to the App Shortcuts APIs on Android (introduced in Android 7.1 / API level 25). It is safe to run this plugin with earlier versions of Android as it will have any impact on the app.
How to use:
- Open Android Studio and create a new Flutter project.
2. Open pubspec.yaml file and add quick_actions plugin dependency under dependencies and hit the Flutter command package get.
3. Inside your lib folder open main.dart and add
4. Initialize the library early in your application’s life-cycle by providing a callback, which will then be called whenever the user launches the app via a quick action.
5. Finally, manage the app’s quick actions
Please note, that the
type argument should be unique within your application (among all the registered shortcut items). The optional
icon should be the name of the native resource (xcassets on iOS or drawable on Android) that the app will display for the quick action.
You can check out the entire code for this post on my repository. Feel free to fork and share your creations as well.
code is here
More Awesome Stuff here.
Now create awesome apps for both the platform with such ease and minimum effort. Creating amazing interfaces in flutter…medium.com
Google I/O ‘18 came up with many exciting new stuff, one of them was the updated Material Design Components. The…android.jlelse.eu
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter…github.com
This repository demonstrates how to create custom fab transformation using Object animators, Circular Reveal and Path…github.com
We have reached the end of this post, If you have any questions about any of the plugin used in this blog, check out the docs or ask in the comments section. hopefully, I gave you enough to get started.
Thanks for reading!
If you enjoyed reading 😍, Show some Love by clapping 👏 on this post!