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.dart
and search for variable namedserverKey
and 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
Capabilities
Tab turn onPush Notifications
andBackground Mode
s, and enableBackground fetch
andRemote notifications
underBackground Modes
.