Flutter Local Push Notification | Custom Sound | Setup from basic

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone today we'll implement flutter local notification first of all what is push notification this is a small pop-up that comes on device for quick update like this let's start the implementation of notification for implementing this we need to add flutter local notification in dependencies in pubsic after that we'll create a class notification visit initialize with static final notification now after this will add a method that is show notification and a sync here notification dot show it will copy this all these methods for this notification details we will create another method uh notification detail here it is here we'll define notification details notification sorry notification details here we have android we'll define android notification details and after that ios notification details inside this you can define channel id and channel name also its importance important start high max whatever i am doing max after this ah we have to define init method in this init method will define android initialization setting here we have to give our icon whatever it will come in notification and i in ios we have this after that inside this initialization setting we'll add this init android setting and ios and also initialize the notification initialize this is very important for showing the notification and now we'll add this init method in init state of local push notification notification widget dot init here this is initialization we have done after that on tab we'll call the method of show notification here notification visit dot show notification from here that title notification and body this is testing notification whatever you want you can define it here in title and body now run the code and here now for custom sound we can add first if you don't like this sound you can stop it for this in android display sound false here first you need to increase the id change the id so we'll run stop the code and run it's in running stage now let's see here we didn't get any sound for ios present sound false it will work for ios if you have to stop the sound for the customization of notification in android inside the app src main resource i have created a raw folder inside this will add that notification file here and you have to comment this inside the sound raw resource android notification sound here we'll add the exact name of this notification file and increase the channel id and stop and run again here we go the issue stop and that run again here here whatever the notification and [Music] we have to comment or we can remove this and inside the sound we have to define the full name of notification dot mp3 and after that you have to follow all these steps for ios setup and it will work for ios as well that's it from my site and thank you for watching the video
Info
Channel: EaseTechnoGyan
Views: 10,846
Rating: undefined out of 5
Keywords:
Id: gXDjrS23lGM
Channel Id: undefined
Length: 7min 27sec (447 seconds)
Published: Sat Apr 09 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.