Quick Actions in Flutter App
In this article we will discuss about how to add quick actions in our flutter app and make our app more user friendly.
🎥 Video Tutorial
🛠️ Dependencies
🔭 Implementation
Quick Actions
allows the user to directly interact with the app right from their device home screen.
- First let’s start by creating a simple app containing two independent screens
first page screen
andsecond page screen
and twoelevated buttons
that will navigate us to the correspondingfirst
orsecond
page screen upon pressing them.
Now, let’s initialize the quick actions
and add the shortcutItems
in it as shown below.
If we now try to run our app we will be able to see the quick actions just by holding the app icon.
We have now successfully implemented the quick actions feature in our flutter app. But if we see the image (display below👇) we will notice the trailing icon as some dot. By default we get this dot icon when we try to add quick actions without providing our custom icon image.
Therefore let’ try adding our custom icon image for both android and iOS.
➡️ For android, we need to add our icon image inside android/app/src/main/res/drawable
folder.
➡️ For iOS, we need to open the project in Xcode just by right click over the ios folder in the project directory.
After which, we need to add the icon image inside the Runner/Runner/Assets/
(as shown below 👇)
Now try uninstalling the app and reinstall it again to visualize the changes.
Well that’s it. 🎉 This is how we can integrate
quick actions in our flutter app.🥳
Refer my video tutorial for complete guide:👉 https://www.youtube.com/watch?v=GKLAl86egj8
Get the complete source code here:👉 https://github.com/vijayinyoutube/quick_action_app
Check out all my Flutter related blogs here.,👇
Other articles you may like.,
🔵Setting up your Flutter app for publishing in Play Store.
🔴Confetti Animation in Flutter
🟡 Change App Launcher Icon in Flutter
🔴 AnimatedContainer Widget in Flutter
Most popular
Flutter Tutorials
If you found this article useful and wish to support my work, you can consider buying me a ☕️ coffee.👇
If you want to know more about Flutter and various Widgets in Flutter…?🤓 Then visit my channel 👉🏻 vijaycreations🚩
Thanks.,