Flutter local notifications

Local Notifications in flutter.

In this article we will discuss about how to generate local notification in our app.

many times we need to show notification in over app, if any background task is performed
or,
if we need a popup notification for inform them.

so let’s talk about this,
in flutter now this time, there best plugin(library) is available for doing this task

for use this,
We follow this steps,

  1. open this link, flutter_local_notification, then added in your pubspec.yaml file.

2. add a notification icon for android,
for this added image in this path, in android folder.

app/src/main/res/drawable/app_icon.png

like this image i added app_icon.png image here,

3. Now its time to coding,

3.1) first add this in your init method.

3.2) this is your notification show method.

3.3 ) this is your notification dialog, that open on notification click,

4) Now full code is here(example),

Now, I am only cover a demo example .

If you need more detail regarding any point.comment here.i will cover those point also.

Android Developer | Flutter Developer | Technical Blogger at medium | community member at stackoverflow | Organizer @FlutterIndore on Twitter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store