Firebase and Push Notifications in Flutter

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 275

  • @X1Zeth2X
    @X1Zeth2X 4 года назад +18

    Out of the many Flutter tutorials out there, you're one of the channels that stands out, well done!
    Your work is highly appreciated.

    • @FilledStacks
      @FilledStacks  4 года назад +2

      Thank you very much, I really appreciate the kind words. I try my best to deliver quality and value in every video so I appreciate the comment.

    • @marcin774
      @marcin774 4 года назад

      you should also checkout "fireship"

    • @basdfgwe
      @basdfgwe 4 года назад

      @@marcin774 Not sure about you, but I find that fireship moves at such a fast pace that it makes it difficult to keep up. I feel that the content is intended more for entertainment combined with education.

    • @marcin774
      @marcin774 4 года назад

      @@basdfgwe I agree with you, fireship is like filelledstacks*1.5 speed. For me it's a choice of: do I want to pause the video every minute and write down what's being presented vs trying to keep up with the author by writing down his code ASAP so I won't have to pause. In my case, second approach is always 💩 - it might solve the problem I'm currently facing, but if I will face same problem again, I sure won't know how to do it and will have to rewatch the video. That's why fireship's speed doesn't bother me, cause I always spend time to analyze the content. Having said all of the above, I think, both fireship and filledstacks have AMAZING, really thought-out content, full of awesome tricks. Resocoder is not bad either :). I definitely learnt much more from them, than I learnt from official docs.

  • @matthewreevesdavis8106
    @matthewreevesdavis8106 3 года назад +3

    Hi Dane. Just wanted to let you know that your approach to architecture, and how you explain it in your tutorials, has made a massive difference in my progression as a Flutter dev. Couple all of that with the fact that it's coming from a fellow South African just makes the entire experience excellent. Look forward to more videos. Take care.

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Hey Matthew! Thanks for reaching out and commenting, I really appreciate the words of encouragement and the feedback in general.
      It makes me happy to also know that I'm helping improve the "programming thinking" in general. It helps more than learning an actual framework.
      Thanks again, and it's great to see more SA flutter devs :D

  • @makemypetgamedevprocess6475
    @makemypetgamedevprocess6475 3 года назад

    Your quality videos help to make of flutter a better community, I acquired most of my knowledge through this channel, thanks filledstacks ❤️🙏

    • @FilledStacks
      @FilledStacks  3 года назад

      That’s so awesome to hear. Thank you for the comment and I’m happy that I could help you on your journey.

  • @Chrisailorful
    @Chrisailorful 3 года назад +2

    Amazing tutorial, thank you for leveling up Flutter's community!

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Thanks for watching and thank you for the positive feedback.

  • @hendrickmanenga9213
    @hendrickmanenga9213 4 года назад +8

    Dam you're helping me increase my income.Thank you so much.God bless you

    • @FilledStacks
      @FilledStacks  4 года назад +3

      hehe, that's the goal :) You're very welcome. Goodluck with your business, hope it goes great!

  • @kemids2842
    @kemids2842 4 года назад +5

    omg! Thank you so much your the best please make more every week.

    • @FilledStacks
      @FilledStacks  4 года назад +1

      It's my pleasure :) I will try my hardest to make more every week.

    • @kemids2842
      @kemids2842 4 года назад +1

      @@FilledStacks please add more tutorial i think you re the best

    • @thewalkevent889
      @thewalkevent889 4 года назад +1

      @@kemids2842 Can't argue with you. He's very straightforward. ♥

    • @moe_shah_0078
      @moe_shah_0078 4 года назад

      Can't argue either.. Didn't think it was so simple to have push notifications..

  • @ChristianKyony
    @ChristianKyony 3 года назад

    As always, brilliant and straight to the point!

    • @FilledStacks
      @FilledStacks  3 года назад

      Awesome. I'm happy I could be helpful, and thank you for watching the video.

  • @storylineteam
    @storylineteam 4 года назад +1

    Another great video Dane. Some additions may be the ability so send notifications to specific users by fetching their device token to a string in firestore, or even better to a array of strings, in case they install the app in multiple devices.
    Also creating a firebase function may help in situations where the user have to receive a notifications when someone sends him a message, like skype or viber. i use typescript for this with the server token of firebase.
    Covering the above in a video as a continuation of this one, can help lots of junior developers.
    All the best.

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Thanks for the suggestions. I usually don't go too deep into app specific functionalities. I abstract what I do in multiple production apps to the core and make a video about that. There's a lot more to do but that would require a series with a specific implementation detail which won't expose more coding fundamentals and will actually just be an implementation video of something they "should" know how to do given they pick up on the techniques and principles used.

  • @chandrakant1219
    @chandrakant1219 3 года назад +1

    This video was really helpful. Thanks. Have one question, doesn't Android require notification permissions?

    • @FilledStacks
      @FilledStacks  3 года назад +2

      Awesome. I'm happy to hear that it helped. And no, Android doesn't require permissions.

  • @nicolaszein
    @nicolaszein 4 года назад

    You sir are AMAZING. Loved your tutorial , it was a breeze. Thank you!!!!!

    • @FilledStacks
      @FilledStacks  4 года назад

      Niiiiice!!! That's exactly how implementing these features should feel. Especially with the setup and architecture that I'm using.

    • @nicolaszein
      @nicolaszein 4 года назад

      @@FilledStacks Speaking of which i'm getting a null navigator when i'm testing. Any idea what i'm doing wrong?

  • @danilof79
    @danilof79 4 года назад

    Bravo! This is complex task but you made it so simple! Great 🤩

    • @FilledStacks
      @FilledStacks  4 года назад

      Yeeaahhhh!! It's awesome right! I use this implementation in all my apps.

    • @danilof79
      @danilof79 4 года назад

      @@FilledStacks me too :)

  • @shamsali9807
    @shamsali9807 3 года назад

    Explained in a very sophisticated way. Much appreciated.
    I have a QUERY, I'm showing a custom popup when notification is received(in onMessage() callback). but when the app is in the background, onMessage() wouldn't trigger how can I show a custom pop-up in this scenerio?

    • @FilledStacks
      @FilledStacks  3 года назад +1

      You'll listen to the onbackground message function and schedule a local notification when it comes through.

    • @shamsali9807
      @shamsali9807 3 года назад

      @@FilledStacks Thanks and love

  • @jeffsonoge9393
    @jeffsonoge9393 4 года назад

    This push thing is so interesting. I had no idea I could squeeze out extra revenue from the same amount of traffic by simply adding push monetization to my sites. Currently I use MonadPlug, works great with AdSense.

    • @FilledStacks
      @FilledStacks  4 года назад

      I did not know that either, I don't use push for monetisation but clients use it to lure users back to the app to make more purchases :)

  • @moe_shah_0078
    @moe_shah_0078 4 года назад

    South Africa! Representing!! Wohoooo!!!!

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Yeeeaaahhhh!!! SA in the house

  • @tqdam
    @tqdam 4 года назад

    Awesome video. You make it easy to understand. Thank you!

    • @FilledStacks
      @FilledStacks  4 года назад

      You're very welcome Tuan :) Thanks for watching and always giving feedback. I appreciate it.

  • @niteshmethani9884
    @niteshmethani9884 2 года назад

    Thank you so much for introducing the flutter project architecture. It took me some time to get used to it but now I am able to implement complex services without disturbing the core functionalities of my app. Thanks a lot, Dan :)
    I have one request, could you make it a full fledged video on notifications like: scheduling them, showing a notification pop up instead of it sitting in the notification tray.
    That would complete this.

    • @FilledStacks
      @FilledStacks  2 года назад +1

      Hey, you're very welcome. I'm happy that you have grasped onto the idea of the architecture. It's very helpful.
      Scheduling notifications locally? We don't really do that so there's nothing special I can show you that's no in the local notification package readme.
      In terms of them showing up, on Android the app has to be in the background for the notification to show. If you want it to show while it's in the foreground you have to add an onMessage listener and use the local notification package to recreate a notification for you.

    • @niteshmethani9884
      @niteshmethani9884 2 года назад

      @@FilledStacks Yes, I have successfully integrated it in the app. I followed exactly what you suggested just that it took me some extra time. In any case, thanks for your comment :)
      I have been following your playlist on food-delivery app. It teaches me how to think, structure, manage and maintain real-world projects at scale. Looking forward for more videos there 😇

    • @FilledStacks
      @FilledStacks  2 года назад

      @@niteshmethani9884 Awesome! I'm very happy to hear that. I'll be sharing some of my real world app building soon. Stick around!

  • @aliakkawi4759
    @aliakkawi4759 4 года назад +1

    Hello Sir, in new Android devices (including Emulators) , notifications are received with no sound even when enabling sound from the Firebase send notification dashboard. How to fix this issue? thanks

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Hi hi, I have no idea. I haven't experienced this. In fact I've actually never tested sound. Wouldn't be able to help you out there.

  • @srineeshsalur524
    @srineeshsalur524 4 года назад

    Thank You. I am sharing this video and not skipping any ads(i feel guilty watching your videos for Free). Would love to see more videos on provider package(mainly stream provider). Also if possible please make a video about creating APIs and a sample app that communicates with multiple APIs and passes the data received internally in the app. Thank you again for the tutorial. Have a great day. Peace✌🏻✌️✌️

    • @FilledStacks
      @FilledStacks  4 года назад

      Thank you. very much appreciated. All my videos use provider 😅 how many more do you want to see haha. I also have created videos about using an api called state and api integration in flutter. also all 3 of my architecture videos cover api calling and data passing.

  • @brandonpillay9025
    @brandonpillay9025 3 года назад +1

    Thank you sharing. I would really like to see a demonstration like this for flutter web and push notifications.

    • @FilledStacks
      @FilledStacks  3 года назад

      That's a good idea. I'll see if I can fit that into my schedule of videos for the year.

  • @alvin3171997
    @alvin3171997 4 года назад +1

    Hi, based on your provider architecture, is there a way to choose when 'onModelReady' should be executed?
    For example:
    Fetching comments via 'onModelReady' on homeview, I navigate to another view and back to homeview again, this is where I don't want to fetch comments again since the data has been fetched previously.
    right now, 'onModelReady' just runs whenever I navigate to the view.

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Good question. No there’s not, I usually build that into the service (return local data or from memory). The view will have no state. It will always be constructed new when you navigate to it. You’ll have to cache your view yourself and pass that when navigating to avoid constructing it again

    • @alvin3171997
      @alvin3171997 4 года назад

      @@FilledStacks And that service will be registered using "LazySIngleton", right?

    • @FilledStacks
      @FilledStacks  4 года назад

      @@alvin3171997 Yes, all services are registered as a lazy singleton to ensure there's only one in the app.

    • @alvin3171997
      @alvin3171997 4 года назад

      @@FilledStacks When you said 'cache the view yourself', is this UI view caching implemented using the 'cache_manager' package that you have shown in your written tutorial?

    • @FilledStacks
      @FilledStacks  4 года назад +1

      @@alvin3171997 No, you can use a map with a key and a widget or just save the view reference as a widget locally to re-use when needed.
      Widget myView = MyView()
      build() {
      return myView;
      }
      That way you only construct it once and then pass it to the build function over and over as it needs it.

  • @lallawmzualakhawlhring7340
    @lallawmzualakhawlhring7340 4 года назад

    Hi Dane, great video as always thank you. I've followed this tutorial and have one problem with the push notification and hoping you might be able to help. The notifications are received and logs are printed correctly(onResume,onMessage,onLaunch printed accordingly) but navigation is not happening when the app is brought to the front . Upon checking I found out that the Global key for navigation is null when I click the notification and open the app(I'm using the navigation as a service guide from you ). This happens when app is minimized or closed with the back button. Any idea what I might be doing wrong?

    • @FilledStacks
      @FilledStacks  4 года назад +1

      That's usually something that happens if you initialise the push notification service before you set the navigation key. I would move the push notification service initialise to the startup viewmodel if it's not there. Or to the homeviewmodel where you land after the startup viewmodel.

    • @lallawmzualakhawlhring7340
      @lallawmzualakhawlhring7340 4 года назад

      Worked like a charm...thanks a million

    • @FilledStacks
      @FilledStacks  4 года назад +1

      @@lallawmzualakhawlhring7340 Awesome. Happy to hear that it's worked

  • @khairulrizma1572
    @khairulrizma1572 4 года назад +3

    you're the best , thank you

  • @AnanthiRamasamy
    @AnanthiRamasamy 3 года назад

    Thank you for your awesome work :)
    Can you kindly suggest can i use the same to send notification for video calls. In that case, how to set the sender of the video call in the FCM?

    • @FilledStacks
      @FilledStacks  3 года назад +1

      The is handling notifications, not sending custom notification. I would have a cloud function where you can submit a name and a token and it sends the notification to the user.
      Or better a reactive function that listens to a collection of calls. When a new document is made it sends a notification to the receiver token in the document.

    • @AnanthiRamasamy
      @AnanthiRamasamy 3 года назад

      @@FilledStacks Thank you for your response and your valuable time. I am using a Go server , will listen to call and send notification to receiver via FCM. Is that correct?

    • @FilledStacks
      @FilledStacks  3 года назад

      yep that's correct.

  • @sriramvs2140
    @sriramvs2140 3 года назад

    Wow the video was super useful!
    How to trigger notifications based on changes in firestore? For example, if a new document is added, a notification should be sent.

    • @FilledStacks
      @FilledStacks  3 года назад +1

      You create a firebase function listening to your collection using the updated callback and then send your push notifications from that function.

    • @sriramvs2140
      @sriramvs2140 3 года назад

      @@FilledStacks
      Recently firebase cloud functions was changed to a paid feature.
      Are there any alternate methods to do this without firebase functions?

    • @FilledStacks
      @FilledStacks  3 года назад +1

      you can use any other free api you want and call fcm from there to send a notification. You won't have real time functionality but you can probably tell your api from your app that there's a new notification to be sent.

  • @ajnaf7277
    @ajnaf7277 4 года назад

    Hello thanks for the great tutorial
    Is there a way to save notifications locally for example using the hive package when the app is in the background

    • @FilledStacks
      @FilledStacks  4 года назад

      You're very welcome. And yes, you do exactly as you said now. use hive or any local storage and store it locally.

    • @ajnaf7277
      @ajnaf7277 4 года назад

      @@FilledStacks i tried that but their is a problem working onBackground method i can't use them is their a way around that?

  • @tharindulakshan3546
    @tharindulakshan3546 3 года назад

    Great work Dane, Has anyone tested this for ios as well ?

    • @FilledStacks
      @FilledStacks  3 года назад

      Yes, we all have. This is what I use for my clients applications and our own.

  • @theforestapp
    @theforestapp 4 года назад

    Using this setup with DialogService from Stacked. when onMessage is triggered I use showDialog- this works fine, until the scenario where there's a second onMessage triggered before the user has tapped OK on the first dialog.
    They can tap ok on the second one, but if they try to tap again, the dialog is stuck there.
    the getter 'isCompleted' was called on null.
    Receiver: null
    Tried calling: isCompleted
    When the exception was thrown, this was the stack
    #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
    #1 DialogService._showDialog.
    package:stacked_services/…/dialog/dialog_service.dart:127
    #2 GestureRecognizer.invokeCallback
    package:flutter/…/gestures/recognizer.dart:183
    #3 TapGestureRecognizer.handleTapUp

    • @FilledStacks
      @FilledStacks  4 года назад

      Most likely because it's still being shown. We could probably add a flag for you to check if a dialog is currently being shown. That should help. For now you can track that in the push notification service to avoid showing the dialog again.

  • @nathanaraujo1239
    @nathanaraujo1239 4 года назад

    very very nice video... the implementation was a bit different for me because i'm not using view models but your video was extremely helpful, thanks

    • @FilledStacks
      @FilledStacks  4 года назад +1

      You're very welcome :) The cool thing about wrapping your code in a service class is that you can inject it and make use of it in basically any architecture. BLoC, redux, MVC. Happy to see you found some value in it.

    • @bestrazer
      @bestrazer 4 года назад

      How did you do it?

    • @nathanaraujo1239
      @nathanaraujo1239 4 года назад

      @@bestrazer I'm using provider

  • @johnbensen3429
    @johnbensen3429 3 года назад

    Thanks
    I have a chat app and i want to show notification to specific users ?
    How to show that?

    • @FilledStacks
      @FilledStacks  3 года назад

      You send a push notification to the users FCM token.

  • @dmgcoding417
    @dmgcoding417 3 года назад

    in my flutter app users receive notifications for some time(forground,background,killed) but then background notifications stops receiving. App is only for android. What could be the issue.

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Background messages need to have a certain format. Make sure the push notification payload is "marked for background"

  • @naseer2009n
    @naseer2009n 4 года назад

    Forecast asking for permission on app load, is it possible to ask for permission on a button click or somewhere in the inside screen?

    • @FilledStacks
      @FilledStacks  4 года назад

      yep. You ask for it in the onTap handler. Just call your model.askForPermissions function if you have one. Or whatever your permission request function is called.

  • @elvisninan6605
    @elvisninan6605 4 года назад

    Really enjoy your totorials. Very crisp and good architecture design.
    Only on this push notification service, I realise that there are challenges when using a service...showing a UI snackbar from a service without BuildContext is a problem (fixed using package Get.snackbar)...state management store dispatch calls from services without BuildContext are a real headache...

    • @FilledStacks
      @FilledStacks  4 года назад

      Thank you, I appreciate the kind words. They are. We have a snackbar service available as well which just wraps get snackbar functionality and adds easier way to register and show custom snack bars.

  • @kuldipbhutoria
    @kuldipbhutoria 4 года назад

    Can you please also describe how to send those push notifications on specific categories? Right now all the notifications go to the Miscellaneous category which is very bad because we can't set priorities for the notifications. I can't find any way to do that. Please help!!! Thank you!

    • @FilledStacks
      @FilledStacks  4 года назад

      Subscribe to a topic to send to specific topics. Register a channel on Android for custom Channels.

  • @Shumi_Desu
    @Shumi_Desu 4 года назад

    Hi Dane, I followed your tutorial and successfully sent a notification that redirects my flutter app to another route. My problem is when I restart my flutter. It looks like it doe'snt clear the previous notifiation and trigger the callback and automatically redirects the route again. Is this the default behavior?

    • @FilledStacks
      @FilledStacks  4 года назад

      No, that's not default behaviour. Sounds like the same function is firing when the app opens again. When you tap on the notification it'll fire the onResume function and pass it the same notification function.

  • @zvrk
    @zvrk 4 года назад

    Is that black screen at the start of the app or when reloading the app on the emulator ? In my recent project i have the sam issue, but i haven't started looking that much into it.

    • @FilledStacks
      @FilledStacks  4 года назад

      That screen is when the app is launched from the push notification. It doesn't happen on devices for me since my push notification navigation logic runs after the first screen is drawn. What I have done before is performed a delayed navigation so the normal app startup view rendering is complete and then I navigate.

  • @Victoruvarov23
    @Victoruvarov23 4 года назад +1

    Thats some clean code. 😁

    • @FilledStacks
      @FilledStacks  4 года назад +1

      haha you know I always try to keep it that way :)

  • @CarlitosUlloa20
    @CarlitosUlloa20 4 года назад

    hello, what emulator you use to work with flutter, I was using Genymotion but I failed to implement Firebase Auth and Notifications..

    • @FilledStacks
      @FilledStacks  4 года назад

      Hi I use the Pixel 2 AVD provided by Android in the Developer tools

  • @gabrielrocha2640
    @gabrielrocha2640 4 года назад

    Thank you so much bro for those vids

  • @samo92mx
    @samo92mx 4 года назад

    Hello, is posible save push notifications before user click it?

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Before the user clicks, probably not. But when the user clicks you can save it.

  • @cyko5950
    @cyko5950 3 года назад

    awe nice tut

  • @jimmyfmedina
    @jimmyfmedina 4 года назад

    Excelent video, very useful.

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Awesome! Very happy to hear that.

  • @KDTechverse
    @KDTechverse 4 года назад

    You're doing great work keep it up big brother !

    • @FilledStacks
      @FilledStacks  4 года назад

      Thank you! I'll try my best to do so

  • @lobanovkirill
    @lobanovkirill 4 года назад

    Hi!
    You can create video with tutorial how to create in app notifications?
    Maybe who know, how to show user notification every fay in 9:00 am or 7:00 pm? It's push notifications or in-app notifications? I am newer in Flutter, and can't understand, how realize that.
    Thank you!

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Hi, I see a few comments on Local notifications. I will look into that after this series of videos is complete.

  • @shanmichaelreyes6255
    @shanmichaelreyes6255 4 года назад

    Thanks best Regards from #PH

    • @FilledStacks
      @FilledStacks  4 года назад

      You're welcome! And thank you :)

  • @timothylungcayana9131
    @timothylungcayana9131 4 года назад

    First of all, thank you this great tutorial. I just want to how to receive notification even if the app is terminated. Can you provide me some example/s?

    • @FilledStacks
      @FilledStacks  4 года назад

      You're very welcome. It does that automatically for you when a notification is received. If you're talking about running background code when you receive a notification you can supply a static background function callback to the configure function.

    • @timothylungcayana9131
      @timothylungcayana9131 4 года назад

      @@FilledStacks Hello. I am finally able to figure out why the app is not receiving notifications on my end. Basically, my app is running on vivo 1718 and upon checking on More Settings -> Applications -> Autostart, my app is not enabled. When I tried to enable my app on Autostart, opened it again (to initialize firebase messaging) and terminated it to test if it is going to receive notification. I triggered my server to send some notification and BAAM. It worked. How's that possible? Can you please explain? Anyways, thanks for helping.

  • @ideepdave
    @ideepdave 3 года назад

    Thank you very much

  • @sanjaynanda2012
    @sanjaynanda2012 4 года назад

    Hey, I have been looking how to send a notification if certain value is changed in the database. Like in a monitoring app I need to send a notification if certain value is exceeded or goes less than the critical value. Please help me, I'm stuck here....

    • @FilledStacks
      @FilledStacks  4 года назад

      Add a cloud function trigger on the documents you want to listen to. Use the onUpdate trigger. Get the document in the trigger, look at the value and then send the notification if it matches your criteria.

  • @abcd56957
    @abcd56957 4 года назад

    Great tutorial!
    Hi Dane! can you extend the push notification tutorial to Notification to Specific Device User?
    Say something like a new message received to Specific user?

    • @FilledStacks
      @FilledStacks  4 года назад

      Thank you. That functionality you would do using topics. I show at the end how to register topics. register your users unique ID as a topic. That way you can send only to that user using the topic functionality. In the push notification initialise functionality you should register every user to a topic of their user id.

    • @paulbaker2499
      @paulbaker2499 3 года назад +1

      @@FilledStacks Dane, wouldnt this be an issue if you use each users unique ID as a subscription topic in order to send specific messages just for that user ? My line of thinking is if you have a very large app with millions of users (say 50+ million) then your approach would have 50 million unique subscriptions if your use case was to send specific messages to a user ? Your suggestion has 1 benefit of simplifying sending a message to all devices owned by 1 user (No need to worry about device tokens and manage this state). However - GCM documentation does point out that if your requirement is to send out messages to a user that has multiple devices DEVICE GROUP MESSAGING instead. My reservation about your approach is a) Latency, b) FCM servers registering so many user topics, c) Potential limitation now or in the future for total number of topics. Lastly, I realise that maintaining Tokens etc is somewhat more troublesome to implement then topic based subscriptions - but just wanted to know why this wasnt suggested as the overhead in terms of FCM processing seems much less than maintaining millions of topics - and have you used your approach on very large installations without any issues ?

    • @FilledStacks
      @FilledStacks  3 года назад

      @@paulbaker2499 Thanks for the detailed question Paul. I appreciate the details. To be honest we experience latency with all push notification registration types. I use topics for the simplicity it provides, the number of topics registered wouldn't make a difference or so far it hasn't. The largest user base I've worked with is about 500k installs all registering 1-3 topics. There's been no noticeable lags. We've recently started using segment for push notifications which allows you to send directly to a push notification token. If you identified the user then you can use the token directly to send a notification. That would basically be the same as maintaining an updated user token on your server side database and using that to send the push notification directly.
      There might be a small decrease in notification lag given that it's not going through the topic queue mechanism, but I haven't seen a large difference. I'd be interested to see the actual difference. I don't think there would be, but FCM is not very consistent so I wouldn't be suprised if what you found is the better way of doing it. At this moment i won't be able to confirm my way is better so I'd lean towards saying you should try the way you read that's recommended, if that doesn't work come back and check out the topic way of doing things.

    • @whyimustusemyrealname3801
      @whyimustusemyrealname3801 3 года назад

      @@paulbaker2499 register your device id to the server and only send to device with that id bro, no need to use topic

    • @whyimustusemyrealname3801
      @whyimustusemyrealname3801 3 года назад

      register your device id to the server and only send to device with that id bro, no need to use topic

  • @jemmytech5474
    @jemmytech5474 3 года назад

    Sir i need your help. Sir How to get someone’s birthday reminders offline, about he/she you added to a sqlite database listview? FCM needs internet connection but i need to be notified offline , yes using flutter

    • @FilledStacks
      @FilledStacks  3 года назад +1

      When adding the birthday schedule a local notification for that day.

    • @jemmytech5474
      @jemmytech5474 3 года назад

      @@FilledStacks can you make a video on setting reminders on a particular date ?

    • @FilledStacks
      @FilledStacks  3 года назад +1

      I can not. Because the readme for the local notifications package has the code in it

    • @jemmytech5474
      @jemmytech5474 3 года назад

      @@FilledStacks oh really but i read the readme carefully, where is it in the readme? Please

    • @FilledStacks
      @FilledStacks  3 года назад +1

      the part where you schedule the notification for a specific time.

  • @omotola9521
    @omotola9521 4 года назад +1

    Great video can we get one for local notifications for flutter 😊... Love you videos thank you ❤️

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Thank you. Not in this series but I’ll probably do one after.

    • @jemmytech5474
      @jemmytech5474 3 года назад

      @@FilledStacks have you done it

    • @FilledStacks
      @FilledStacks  3 года назад

      @@jemmytech5474 I have not

  • @mxolisinkosinathinene2657
    @mxolisinkosinathinene2657 4 года назад

    Hi I am new to flutter and I have created an e-commerce app using your video so I would like to know have you worked with payments in flutter if yes can you please make a video coz I tried with strip and Paypal they are okay but they don't support the South African Rand please suggest and payment gateway for payment that supports the Rand in Flutter

    • @FilledStacks
      @FilledStacks  4 года назад

      Hey,yes I have. we use payfast for payment integration. they have docs on their site om how to do it.

    • @mxolisinkosinathinene2657
      @mxolisinkosinathinene2657 4 года назад

      FilledStacks can you please do a video on it using http request for payments

  • @Cedielagekohaha
    @Cedielagekohaha 4 года назад

    Wow! Such an awesome job to make it simple as possible. Does this work in iOS also?

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Thank you :) Yes Flutter runs on iOS and Android

  • @vishwayasas7981
    @vishwayasas7981 3 года назад

    Is it possible to send separate messages to different users this way?

    • @FilledStacks
      @FilledStacks  3 года назад

      This is the code required to receive a push notification. If you want to send to a user you can just pass that users FCM token to your backend when sending the message and it'll go directly to that user.

    • @vishwayasas7981
      @vishwayasas7981 3 года назад

      @@FilledStacks It's not clear to me sir. Can this code send a message only to the user we want?

    • @FilledStacks
      @FilledStacks  3 года назад

      no. this code is not for sending messages. You should not be watching this video. You should be learning problem solving skills and fundamentals of programming.
      Then sending doesn't happen on a device. A backend sends the push notifications. Not the app itself.

  • @maakuuu
    @maakuuu 4 года назад

    Thank you for this. Would you mind to implement a bottom nav bar along with onboarding process via sharedpreferences? :)

    • @FilledStacks
      @FilledStacks  4 года назад

      it's my pleasure to make. I might do an on onboarding process but i won't be doing a bottom nav bar. there's lots of tutorial out there on that one already.

    • @maakuuu
      @maakuuu 4 года назад

      @@FilledStacks Thanks!!! I'll try to figure out a way to incorporate a bottom nav bar on the HomeView. Still learning stuff about provider and flutter in general. Thanks for you great videos man! #FilledStacksArmy

    • @FilledStacks
      @FilledStacks  4 года назад

      @@maakuuuNice! Yeah it's a common misconception that you'd have to implement things differently. But the way my architecture is setup is to ensure you can still implement things the same way as you would without the provider architecture.

  • @berosolo866
    @berosolo866 4 года назад

    always the best

  • @exploringflorida9309
    @exploringflorida9309 3 года назад

    Can you please explain Locator.dart? What is it and how do I implement it?

    • @FilledStacks
      @FilledStacks  3 года назад

      I have in my other videos. Search for provider architecture on my channel and watch that video.

  • @whyimustusemyrealname3801
    @whyimustusemyrealname3801 3 года назад

    do you have a version with normal architecture? I don't like to use services or viewmodel concept.

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Normal architecture meaning everything in one file? If so then no. This is the only way I write code. This can be used with any code setup, it's just an application of the S in the SOLID principles. It actually has nothing to do with any architecture. This is exactly how i would use it in BLoC, Redux or and other state management solution that exists for Flutter. So whichever one you use, you can apply this directly. Only different would be I won't call my class a service, I'd call it something else (whatever you like calling a class that wraps functionality into a single place).

    • @whyimustusemyrealname3801
      @whyimustusemyrealname3801 3 года назад

      @@FilledStacks not one file, but I kinda new my architecture following bloc example by felangel

    • @FilledStacks
      @FilledStacks  3 года назад

      @@whyimustusemyrealname3801 Aaaaaah I see. I don't use BloC but I know a lot of devs that use bloc with services. It just makes sense to wrap functionality that belongs together into one file. That's if you use the SOLID principles as your base for software engineering. If you don't then most likely you're fine with mixing functionality across multiple files. All I'm doing here is making a class that handles all the push notification stuff, you can call it from your Bloc, your views, the main file. It's just something that helps with maintenance, it doesn't have anything to do with the state management solution.

    • @whyimustusemyrealname3801
      @whyimustusemyrealname3801 3 года назад

      @@FilledStacks hey thanks for being so interactive hope your channel will grow more, thanks I think I will just make one class for the notifications/services like you said

    • @FilledStacks
      @FilledStacks  3 года назад +1

      @@whyimustusemyrealname3801 You're welcome. My goal is to help spread the knowledge that's helped me build and deliver large projects. The comment section is a great place to do that so I'm very grateful for questions. Especially challenging ones that will help me get more insights into how other developers do things. We're both benefiting from it so it's a win-win! Thanks again for commenting.

  • @fazlerabby122
    @fazlerabby122 3 года назад

    Hi. please make a video about this topics with recent version of firebase messaging. Thanks in advance.

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Hi, that should be coming up soon in the BoxtOut series I'm doing

  • @jaineelmamtora4231
    @jaineelmamtora4231 3 года назад

    Please make 'onBackgroundMessage' handler tutorial as well!

    • @FilledStacks
      @FilledStacks  3 года назад +1

      If you know about the property you know how to use it. You just supply a static function to it and it'll be called when you get a notification.

  • @simon_s
    @simon_s 4 года назад

    For me, it's only working on emulator, not on the physical Device. I'am not using local notifications plugin (on iOS)

    • @FilledStacks
      @FilledStacks  4 года назад

      For iOS you have to make sure your certs you upload for push notification matches the app id you selected in the dev account and in your project in xcode. It's very important.

    • @simon_s
      @simon_s 4 года назад

      @@FilledStacks It does match... In fact, I can receive the notifications on background and when the app is closed butthe callback function onMessage is never called...

    • @FilledStacks
      @FilledStacks  4 года назад

      Mmmmm, you’ll have to check the docs for that. I think they mention it in there that only resume and startup is used in iOS.

  • @osagiepromise5026
    @osagiepromise5026 4 года назад

    Nice work man
    Please when the app is closed... I don't receive notifications, can you help out

    • @FilledStacks
      @FilledStacks  4 года назад

      That's usually the only time you receive the notifications. When it's not in the foreground. That's how it works in this video. You have to run in release mode because closing the app after a debugger is attached leaves it in an unwanted state.

    • @osagiepromise5026
      @osagiepromise5026 4 года назад

      I have actually been running in release mode... Thanks for the reply anyways anyways

  • @MuhammadAmir-mf9xt
    @MuhammadAmir-mf9xt 4 года назад

    Awesome 👍👍👍

  • @mkmalikcom
    @mkmalikcom 3 года назад +2

    guys visit his website (link in description)
    He has amazing contents with great details and superb ui ux.
    Loved it♥️

    • @FilledStacks
      @FilledStacks  3 года назад +1

      Thanks for sharing that. I appreciate it. The website does have quite a lot of useful content in it. I'd also recommend everyone to go and check it out :D

  • @SonalGrover
    @SonalGrover 4 года назад +1

    I am not receiving notification when my app is in the foreground in the IOS device. please help

    • @FilledStacks
      @FilledStacks  4 года назад

      That is expected like I said in the tutorial. I explained the three callbacks and when the messages come through. Notifications won't show in the notification panel when the app is open because the purpose of a notification is to get you into the app. If the app is open it doesn't need to do that because you're already in the app.

    • @devdeejay749
      @devdeejay749 4 года назад

      @@FilledStacks But we still get whatsapp notification from different chats right? even though we might still be using the app.

    • @somebodyyouusedtoknow8600
      @somebodyyouusedtoknow8600 4 года назад

      @@devdeejay749 you got a point here, I want to do the same.

    • @somebodyyouusedtoknow8600
      @somebodyyouusedtoknow8600 4 года назад +1

      @@devdeejay749 maybe we should use local notifications for that case ?

    • @mabialaemile8541
      @mabialaemile8541 4 года назад

      @@devdeejay749 lol on Android you can call the notification center and push it yourself from the app, what happens is simple lol (on iOS too)
      1) Your app is running
      2) your app receive a message notification
      3) your app connects to the notification center and post the notification there itself
      4) you get a notification, How do you reproduce this in flutter , easy
      -> Follow this tutorial till the end
      -> Go on Pub.dev and add the package called "Flutter_local_notification"
      -> Follow the page installation tutorial and you will see that you can actually send a notification to yourself any time lol using
      -> Once you receive a notification from your app, on the method that handle the app on foreground, just add the piece of code of "flutterLocalNotification" lol and you'll be done
      Conlusion: Coding is simple, you just need to be creative

  • @dumisanizikhali1724
    @dumisanizikhali1724 4 года назад

    Good stuff

  • @chloevsdanise2711
    @chloevsdanise2711 4 года назад

    really amazing tutorial as always can you do search and filter with firebase please love lots

    • @FilledStacks
      @FilledStacks  4 года назад

      Thank you, I think search functionality is also on the list of tutorials to make

    • @kemids2842
      @kemids2842 4 года назад

      up for this also excited for this tutorial please make it this week

    • @FilledStacks
      @FilledStacks  4 года назад

      @@kemids2842 I have other things planned for the next few weeks, I'll see if I can slot it in after that

    • @kemids2842
      @kemids2842 4 года назад

      @@FilledStacks omg always be your no1 fan

    • @FilledStacks
      @FilledStacks  4 года назад

      😎😎🤗

  • @danielbelemduarte
    @danielbelemduarte 4 года назад

    How to send targeted notifications to a specific user / device ?

    • @FilledStacks
      @FilledStacks  4 года назад +1

      Subscribe them to a topic using their unique identifier, then send the message directly to that topic from the console / backend

  • @Flickyt
    @Flickyt 4 года назад

    i am recieving notification but no data on the flutter app help

    • @FilledStacks
      @FilledStacks  4 года назад

      Log out the message to confirm what's happening.

  • @himsha64
    @himsha64 4 года назад

    can you please explain how to set large Icon in Notifications

    • @FilledStacks
      @FilledStacks  4 года назад +1

      the notification icons are set through the android manifest. You can also set it through native android code. Don't have the code right now but I did it a while back.

    • @himsha64
      @himsha64 4 года назад

      @@FilledStacks developer.android.com/training/notify-user/expanded#java like this user icon

  • @epharmacysolutions
    @epharmacysolutions 3 года назад

    How we will add abandoned cart tag in flutterr

  • @joelgimenez
    @joelgimenez 4 года назад

    Instant subscribe

    • @FilledStacks
      @FilledStacks  4 года назад

      Wooohooooooo!! That's awesome man! Thank you

  • @HimanshuYT
    @HimanshuYT 4 года назад

    Thanks bro! #FilledStacks Army

  • @davidkanai6944
    @davidkanai6944 4 года назад

    thank you

  • @umairbinali3956
    @umairbinali3956 4 года назад

    i have all of the videos.. why are you guyz sending the notification when the app is in foreground do one thing please send the notification when you are in the app the notification will never arrive..

    • @FilledStacks
      @FilledStacks  4 года назад

      Notifications don't show up in the system tray when the app is open. That is by design. It shouldn't show up there because the app is already open. Notifications is a way for a developer to get the user to open the app again, there's no point in a notification if the app is already open. It only shows when it's in the background. And in the video i send a notification in all the states.

  • @leekaizhe3360
    @leekaizhe3360 3 года назад

    Hi may i know where can i get the GetIt locator = GetIt.instance; file ? at 3:30

    • @FilledStacks
      @FilledStacks  3 года назад

      That was setup in the initial video for this series. It's also shown in the first episode in the "Architect a flutter app" playlist.

  • @kratipandey1011
    @kratipandey1011 4 года назад

    hello sir, i want to open an app if onbackgroundhandler is called . please provide any solution for this ?

    • @FilledStacks
      @FilledStacks  4 года назад

      provide a static function to the background handler that calls into native code to open your activity into the foreground.You'll probably get banned from the app store if you do that since it goes against the new "less phone usage" rules all OS's are putting in place. Opening your app on someones phone while they're busy would definitely warrant an immediate uninstall. At least for me.

    • @kratipandey1011
      @kratipandey1011 4 года назад

      @@FilledStacks sir..... actually this code will be used to open an app while video call is coming

    • @kratipandey1011
      @kratipandey1011 4 года назад

      I am handle video call from firebase messaging in flutter

  • @rajamuhammadkamalrajabadly2985
    @rajamuhammadkamalrajabadly2985 4 года назад

    Login failure, network error (such as timeout, interrupted connection or unreachable host) has occured

    • @FilledStacks
      @FilledStacks  4 года назад

      Mmmm, sounds like a Login failure, network error (such as timeout, interrupted connection or unreachable host) has occured

  • @moe_shah_0078
    @moe_shah_0078 4 года назад

    Future Topic: In App Purchases with google and payfast?

    • @FilledStacks
      @FilledStacks  4 года назад

      That's not a bad topic at all for a video.

    • @moe_shah_0078
      @moe_shah_0078 4 года назад

      @@FilledStacks I did it with webview in the app, then had a success page on the url. Email me, I'll send you the app in Google play to check out. emsm007@gmail.com

  • @miguelnuno928
    @miguelnuno928 3 года назад

    What is locator?

  • @sarpgunes2681
    @sarpgunes2681 3 года назад

    what if i dont have locator.dart file??

  • @basharshaker3593
    @basharshaker3593 4 года назад

    How can i implement this in a chat app?
    Thank you very much for these tutorials!!

    • @FilledStacks
      @FilledStacks  4 года назад

      You're very welcome. You can implement it the exact same way in a chat app. The type of application doesn't change the way this particular set of code will be written.

    • @basharshaker3593
      @basharshaker3593 4 года назад

      I mean like getting a notification when the user gets a message

  • @newbiefromph
    @newbiefromph 4 года назад

    how about device to device?

    • @FilledStacks
      @FilledStacks  4 года назад

      it'll be the same way, each device can register to a topic with their user id and you can send the notification specifically to that topic through FCM

  • @muhammadfaiz2048
    @muhammadfaiz2048 4 года назад

    where do i find locator.dart?

    • @FilledStacks
      @FilledStacks  4 года назад +1

      In the first video where I set it up :) it's the file that registers the get_it services.

  • @tahirdevlog2047
    @tahirdevlog2047 4 года назад

    thanks

  • @suyogamin1859
    @suyogamin1859 3 года назад

    "FirebaseMessaging _message = FirebaseMessaging();" this line gives error "FirebaseMessaging doesnt have a default constructor".

    • @FilledStacks
      @FilledStacks  3 года назад +1

      That's because it's been removed. You should always consider the date of the video and most importantly look at the readme for the package being used. That'll ensure you always use the latest implementation of something.
      I think it's FirebaseMessaging.instance now.

    • @suyogamin1859
      @suyogamin1859 3 года назад

      @@FilledStacks yup.. Actually i was new to this but i solved this problem afterwards .

    • @FilledStacks
      @FilledStacks  3 года назад +1

      @@suyogamin1859 great. I'm happy to hear that.

  • @khalidmohammed7820
    @khalidmohammed7820 2 года назад

    How to open a view directly without clicking the action

    • @FilledStacks
      @FilledStacks  2 года назад +1

      You can't. You have to tap the push notification to open the app.

    • @khalidmohammed7820
      @khalidmohammed7820 2 года назад

      @@FilledStacks thanks

  • @chinmayagarnaik6458
    @chinmayagarnaik6458 4 года назад

    Hi bro can you make a video on how to keep user logged in

    • @FilledStacks
      @FilledStacks  4 года назад +1

      I did :) It's the second video of this series called custom startup logic and user profiles.

    • @chinmayagarnaik6458
      @chinmayagarnaik6458 4 года назад +1

      I know i watched that video after updateing flutter skd some errors occurred can you tell me your flutter SDK version

    • @FilledStacks
      @FilledStacks  4 года назад +1

      @@chinmayagarnaik6458 Shouldn't make a difference. I use that logic in all my apps, even the desktop ones which are on master, latest. Clean your project and run again.

  • @omtecnologia
    @omtecnologia 2 года назад

    Any example with iOS?

    • @FilledStacks
      @FilledStacks  2 года назад

      The code is not different for iOS. Only the configuration of the iOS project is slightly different. But the code is exactly the same for both.

    • @omtecnologia
      @omtecnologia 2 года назад

      @@FilledStacks Thanks for the answer, yes the code i use the same, my problem is with the "slightly" configuration

    • @FilledStacks
      @FilledStacks  2 года назад

      @@omtecnologia Yeah, iOS has one of the worst native integration experiences for these things. You'll have to play around with it until the notifications show up.

    • @omtecnologia
      @omtecnologia 2 года назад

      @@FilledStacks iOS needs a request permission, and this is not working for my app... idk what is wrong.. any example iOS code?
      NotificationSettings settings = await messaging.requestPermission(
      alert: true,
      announcement: false,
      badge: true,
      carPlay: false,
      criticalAlert: false,
      provisional: false,
      sound: true,
      );

    • @FilledStacks
      @FilledStacks  2 года назад

      @@omtecnologia Did you add the permission requirements in the info.plist file?

  • @ChedoTech
    @ChedoTech 4 года назад

    got notification on debug console but did not get on device

    • @FilledStacks
      @FilledStacks  4 года назад

      makes sense, you won't get notifications when the app is open

  • @dharmang
    @dharmang 4 года назад

    Great content!!!... Very less views tho 🙁

    • @FilledStacks
      @FilledStacks  4 года назад +2

      Thank you. Views don't matter much to me ☺️ i care about bringing value and helping. If this video has helped you or anyone else then i've achieved my goal. The views is not my main priority.

    • @FilledStacks
      @FilledStacks  4 года назад +2

      But if you want to help all you have to do is share it :)

  • @clehwispdev6512
    @clehwispdev6512 4 года назад

    in my project there is no such Locator.dart

    • @labanmogire8973
      @labanmogire8973 4 года назад

      go to the code on github it is there

    • @FilledStacks
      @FilledStacks  4 года назад

      You have to make it if you weren't following along with the series.

    • @FilledStacks
      @FilledStacks  4 года назад

      thanks for helping out :)

  • @riccardod9690
    @riccardod9690 3 года назад

    where is code for download?

    • @FilledStacks
      @FilledStacks  3 года назад

      In the description and also on the filledstacks.com website under the tutorial image/ video

  • @katorimirido3568
    @katorimirido3568 4 года назад

    How to random body everyday in method showDailyAtTime? package flutter_local_notification

    • @FilledStacks
      @FilledStacks  4 года назад

      hey hey, I don't know what you're askin

  • @shei69
    @shei69 3 года назад

    How do I add notification actions like reply on WhatsApp?

    • @FilledStacks
      @FilledStacks  3 года назад

      You have to build a custom local notification using local notifications

  • @rajvishah402
    @rajvishah402 4 года назад

    Can you tell me What is NavigationService ??

    • @FilledStacks
      @FilledStacks  4 года назад

      I can. It's a service class that wraps the navigation functionality so we can make use of it without the context. Watch the previous videos or just install stacked_Services and assign the nav key in your main file.