How to use app badge count for notifications?

Actions & Logic

How can I get the app badge count to count the list of notifications a user has not read yet?
The documentation so far is really sparse, so trying to build in a basic feature to show you have notifications.

What have you tried so far?

I am currently generating a list of documents notifications where notifcationuserID = auth user.
and ordering them decreasing -> time created.

I believe I simply need the badge count to be the amount of notifications since the last time the page was read, this gets updated on page load.

However, I need to badge to increase instantly for the user who receives the notification and don't want them to have to go on the app for it to be triggered on page load as this is counter productive.

I have tried adding a query action and sorting by a "last read time" tied to the users collection.

So i have a time stamped notification and a last seen by user.

I have notification markers showing if you have a notification using this technique. It is on conditional visibility if notiTime created> Lastreadtime.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
6 replies