https://github.com/sur16-cse/push_notification_flutter
It is push notification with the help of flutter and firebase, user get notified about new update in app.
https://github.com/sur16-cse/push_notification_flutter
firebase-core firebase-messaging flutter http push-notifications
Last synced: 6 months ago
JSON representation
It is push notification with the help of flutter and firebase, user get notified about new update in app.
- Host: GitHub
- URL: https://github.com/sur16-cse/push_notification_flutter
- Owner: sur16-cse
- License: bsd-3-clause
- Created: 2023-06-15T11:53:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-31T09:37:40.000Z (over 2 years ago)
- Last Synced: 2025-02-26T09:33:34.424Z (about 1 year ago)
- Topics: firebase-core, firebase-messaging, flutter, http, push-notifications
- Language: C++
- Homepage: https://pub.dev/packages/push_notification_firebase/score
- Size: 351 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# push_notification
A new Flutter project.
## App configuration for firebase push notification:
- Create firebase Project for individual project
- set up and change (optional) package name : The package name will be available in the ./android/app/build.gradle file of your Flutter project.
- After register: google-services.json file which will link our Flutter app to Firebase Google services. We need to download the file and move it to the ./android/app directory of our Flutter project.
- Add Firebase Configurations to Native Files in your Flutter Project: root-level (project-level) Gradle file (android/build.gradle), we need to add rules to include the Google Services Gradle plugin.
```
buildscript {
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
}
dependencies {
...
// Add this line
classpath 'com.google.gms:google-services:4.3.4'
}
}
allprojects {
...
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
...
}
}
```
- (app-level) Gradle file (android/app/build.gradle), we need to apply the Google Services Gradle plugin.
```
// Add the following line:
**apply plugin: 'com.google.gms.google-services'** // Google Services plugin
```
- Integrate Firebase Messaging with Flutter: add the firebase-messaging dependency to the ./android/app/build.gardle file.
```
dependencies {
//add this line
implementation platform('com.google.firebase:firebase-bom:32.1.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
root level build.gradle
dependencies {
//add this
classpath 'com.google.gms:google-services:4.3.15'
}
```
- minsdkversion should be 19
- these permissions need to be there in android manifest file
```
```
- for building default notification channel this should be inside android manifest
```
```
- for giving icon to push notification ./android/app/src/main/res inside that extract icon and put it in res folder and it is responsible for giving icon to push notification
## Functionality package provide:
- request permission
- getDeviceToken
- tokenRefesh if expire
- foreground notification
- background notification
- Interact with notification after click switch to some page i.e, deep linking
- subscribe notification related to particular topic
- unsubscribe from topic
- customising banner of push notification
- different template support (add image, add body, add icons)
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.