Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

A complete Flutter Group Chat App with Firebase that supports video calls. It handles typing, received and read indicators, Group Management, closed app and opened app notifications, security, account creation, login, mutex for generating the numeric Agora UID and more.

License

NotificationsYou must be signed in to change notification settings

RodrigoBertotti/flutter_group_chat_app_with_firebase

Repository files navigation

A complete Flutter Group Chat App with Firebase that supports video calls.It handles typing, received and read indicators, Group Management, closed app and opened app notifications,security, account creation, login, mutex for generating the numeric Agora UID and more.

  • Firebase Cloud Messaging (FCM) is used to send push notifications when the user sends a new message or joins a video call.
  • Firebase Cloud Functions: The backend that handles the Agora token request so the user can join the call. It also runs triggers when a Firestore document changes, like sending push notifications when a new message is created.
  • Video Calls are handled withAgora, the packageagora_rtc_engine is used to handle video calls,agora_uikit is used for the video call screen layout.
  • Firestore Security Rules:firestore.rules file contains rules like: only admins can add users to the group, users can only see public data of other users, etc.
  • Firestore Indexes:firestore.indexes.json file contains the Firestore indexes.

Platforms

AndroidiOSWeb
Video Calls
All other features

Getting Started

Step 1:

To get started, open the terminal in theflutter_app folder.

Go to your Firebase project > Click on the Engine ⚙️ button right to "Project Overview" > Copy yourProject IDFollow the instructions ofAdd Firebase to your Flutter app and run these two commands inside theflutter_appfolder, replacepaste-your-project-id-here with your own Project ID.

dart pub global activate flutterfire_cliflutterfire configure --project=paste-your-project-id-here

Go to your Firebase Console > Build > Authentication > Get Started > Sign-in method > Email/Password and enable Email/Password and save it.

Go to your Firebase Console > Build > Firestore Database > Create database. You can choose any option (Start in production mode orStart in test mode), it's not important because we will update the security rules in the following steps.

Step 2: Push notifications (optional)

iOS and Web platforms require additional configuration for Firebase Cloud Messaging (FCM),so you can show push notifications when a user receives a new text message.

iOS

Follow these instructions on iOS.

Web

AvapidKey is required for web.

  1. Get your vapidKey on the Firebase Console, you can check theinstructions here.
  2. Go to the fileflutter_app/lib/core/domain/services/notifications_service.dart
  3. Replace the value of_vapidKeyForWeb with your own vapidKey

Set the environment on theweb/environment file:

  1. Copy the values fromweb field in theflutter_app/lib/firebase_options.dart file
  2. Paste the values in theflutter_app/web/environment.js file

Step 3: Video Calls (optional)

  1. Create yourAgora account, go to theprojects page and click on "Create a Project"
  2. Under "Authentication" choose theSecured mode: APP ID + Token (Recommended) option
  3. Copy theApp ID value and save in your notepad so that we can use later
  4. Click on "Configure"
  5. On "App Certificate", copy thePrimary Certificate value as well
  6. Go tofunctions/environment.ts and set the Agora App ID and App Certificate.
  7. Go toflutter_app/lib/environment.dart and set only the Agora App ID there.

⚠️ Do not expose your App Certificate

Step 4: Deploying

  • Runnpm install -g firebase-tools to install the Firebase CLI
  • Runfirebase use --add and select your Firebase project, add any alias you prefer
  • Optional: In case you prefer not deploying to web, go tofirebase.json file and remove thehosting object
  • And finally, runfirebase deploy, so the firestore security rules will be updated, cloud functions and indexes will be created.

License

MIT

About

A complete Flutter Group Chat App with Firebase that supports video calls. It handles typing, received and read indicators, Group Management, closed app and opened app notifications, security, account creation, login, mutex for generating the numeric Agora UID and more.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp