If my code is helpful to you, I really appreceiate if you buy me a coffee 🙇🏻♂️☕️
iOS Device | Android Device |
---|---|
** To use it, you have to change your permission in the Database and Storage of the firebase.
Go to Firebase Console - Database - Rule. Change it this
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
And change the permission in Storage
Go to Firebase Console - Storage - Rules.
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth != null;
}
}
}
And To use notification, Please copy your firebase project server String to Model/const.dart file
Go to Firebase Console - Project settings - Cloud Messaging - Server key.
const String firebaseCloudserverToken = 'YOUR_FB_SERVER_KEY';//AAAAFxtLywg:APA91bFbcXfhUI2b2MagqgYnL
const String firebaseCloudvapidKey = 'YOUR_VAPID_KEY';
const String youtubeChannelLink = 'https://www.youtube.com/channel/UCLNCErWFQ6LZoaV_JKOq_lQ';
const chatInstruction = """Chat App is committed to maintaining a healthy chat, and blocks users who disseminated vegan chats or photos.
We do not provide any other services other than this application. Beware of scam or illegal website promotion.
Attempts to send obscene, offensive, racist messages or request money transactions can result in permanent suspension and criminal prosecution.""";
- Main features *
- Realtime chatting with chat date ( Don't need a refresh )
- Push Notification with Image( Background, Foreground )
- Check is Read Message
- Custom Local Notification design
- Badge count ( Show unread message count)
- Send an image and edit ( Crop image and it can expand the image)
The chat function is used in many apps. Flutter allows you to create iPhone and Android apps simultaneously. The main functions are push notification (background, foreground), Badge count, send an image, chat realtime. If you have any problems with my code or have any ideas to update, please leave a comment.
- Develop environment.
- Flutter SDK Version: 2.0.1
- Dart: 2.12.0
- Xcode Version: 12.4
- Android Studio: 4.1
- OS Version: MacOS Big Sur 11.2.3
Thank you for watching :)
#Flutter, #MobileApp, #Chatapp
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.