Notifications
Setup.
For notifications between users and admin, we will use firebase messaging. So, we need the server key. To get it, you have to go to Project settings → Cloud messaging and copy the server key.
Open
lib/shared/constants/constants.dartand search for variable namedserverKeyand put your server key.
Android
To change notification icon, go to android/app/src/main/res/drawable and replace notification_logo.png with yours (keep same file name).
IOS
- Generate the certificates required by Apple for receiving push notifications following this guide in the Firebase docs. You can skip the section titled
Create the Provisioning Profile. - In Xcode, select Runner in the Project Navigator. In the
CapabilitiesTab turn onPush NotificationsandBackground Modes, and enableBackground fetchandRemote notificationsunderBackground Modes.