{"id":22945415,"url":"https://github.com/ankit-slnk/flutter_firebase_chat_demo","last_synced_at":"2026-04-12T13:05:28.995Z","repository":{"id":226941638,"uuid":"293669853","full_name":"Ankit-Slnk/flutter_firebase_chat_demo","owner":"Ankit-Slnk","description":"Flutter Firebase Chat Demo","archived":false,"fork":false,"pushed_at":"2022-02-23T17:45:37.000Z","size":2486,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T21:50:40.291Z","etag":null,"topics":["android","chat","dart","demo","firebase","flutter","ios","java","swift"],"latest_commit_sha":null,"homepage":"https://ankitsolanki.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ankit-Slnk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-08T01:29:32.000Z","updated_at":"2022-03-29T16:33:30.000Z","dependencies_parsed_at":"2024-03-10T18:45:29.119Z","dependency_job_id":null,"html_url":"https://github.com/Ankit-Slnk/flutter_firebase_chat_demo","commit_stats":null,"previous_names":["ankit-slnk/flutter_firebase_chat_demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ankit-Slnk/flutter_firebase_chat_demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankit-Slnk%2Fflutter_firebase_chat_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankit-Slnk%2Fflutter_firebase_chat_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankit-Slnk%2Fflutter_firebase_chat_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankit-Slnk%2Fflutter_firebase_chat_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ankit-Slnk","download_url":"https://codeload.github.com/Ankit-Slnk/flutter_firebase_chat_demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankit-Slnk%2Fflutter_firebase_chat_demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262897057,"owners_count":23381346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","chat","dart","demo","firebase","flutter","ios","java","swift"],"created_at":"2024-12-14T14:32:25.673Z","updated_at":"2026-04-12T13:05:28.964Z","avatar_url":"https://github.com/Ankit-Slnk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Firebase Chat Demo\n\n![Flutter Firebase Chat Demo](flutter_firebase_chat.png)\n\nThis demo will show us how to make chat app using firebase.\n\n## Setup\n\nUse latest versions of below mentioned plugins in `pubspec.yaml`.\n\n| Plugin | Pub | Explanation |\n|--------|-----|-------------|\n| [connectivity](https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity) | [![pub package](https://img.shields.io/pub/v/connectivity.svg)](https://pub.dev/packages/connectivity) | Used to check internet connectivity. \n| [firebase_auth](https://github.com/FirebaseExtended/flutterfire) | [![pub package](https://img.shields.io/pub/v/firebase_auth.svg)](https://pub.dev/packages/firebase_auth) | Used to authenticate phone.\n| [firebase_core](https://github.com/FirebaseExtended/flutterfire) | [![pub package](https://img.shields.io/pub/v/firebase_core.svg)](https://pub.dev/packages/firebase_core) | Used for core Firebase Api.\n| [shared_preferences](https://github.com/flutter/plugins) | [![pub package](https://img.shields.io/pub/v/shared_preferences.svg)](https://pub.dev/packages/shared_preferences) | Used to store data locally in key-value pairs.\n| [fluttertoast](https://github.com/PonnamKarthik/FlutterToast) | [![pub package](https://img.shields.io/pub/v/fluttertoast.svg)](https://pub.dev/packages/fluttertoast) | Used to show toast.\n| [cached_network_image](https://github.com/Baseflow/flutter_cached_network_image) | [![pub package](https://img.shields.io/pub/v/cached_network_image.svg)](https://pub.dev/packages/cached_network_image) | Used to load and cache network images.\n| [firebase_storage](https://github.com/FirebaseExtended/flutterfire) | [![pub package](https://img.shields.io/pub/v/firebase_storage.svg)](https://pub.dev/packages/firebase_storage) | Provides Firebase Cloud Storage.\n| [image_picker](https://github.com/flutter/plugins) | [![pub package](https://img.shields.io/pub/v/image_picker.svg)](https://pub.dev/packages/image_picker) | Used to select images and taking new pictures.\n| [provider_architecture](https://github.com/FilledStacks/provider_architecture) | [![pub package](https://img.shields.io/pub/v/provider_architecture.svg)](https://pub.dev/packages/provider_architecture) | Provides ViewModelBuilder class for building UI FROM the ViewModel.\n| [get_it](https://github.com/fluttercommunity/get_it) | [![pub package](https://img.shields.io/pub/v/get_it.svg)](https://pub.dev/packages/get_it) | This is a simple Service Locator.\n| [cloud_firestore](https://github.com/FirebaseExtended/flutterfire) | [![pub package](https://img.shields.io/pub/v/cloud_firestore.svg)](https://pub.dev/packages/cloud_firestore) | Cloud Firestore, a cloud-hosted, noSQL database with live synchronization and offline support.\n| [after_layout](https://github.com/fluttercommunity/flutter_after_layout) | [![pub package](https://img.shields.io/pub/v/after_layout.svg)](https://pub.dev/packages/after_layout) | Execute code after the first layout of your widget has been performed.\n| [photo_view](https://github.com/fireslime/photo_view) | [![pub package](https://img.shields.io/pub/v/photo_view.svg)](https://pub.dev/packages/photo_view) | Provides a gesture sensitive zoomable widget.\n\nAnd then\n\n    flutter pub get\n\nVisit [Firebase Console](https://console.firebase.google.com/u/0/?pli=1) to add new project. Add `Android` and `iOS` app to that project. Add `google-services.json` and `GoogleService-Info.plist` for `Android` and `iOS` respetively to its predefined place in flutter project.\n\nNow enable `Anonymous` Sign-in method (second tab) in Authentication. \n\nAnd create Cloud Firestore and Storage below Authentication.\n\n#### For Android\n\n    \u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\nPlease mention `internet` permission in `AndroidManifest.xml`. This will not affect in `debug` mode but in `release` mode it will give `socket exception`.\n\nAdd SHA-1 in firebase app \n\n    1. Open app in Android Studio\n    2. Open Gradle panel\n    3. Goto andoid -\u003e app -\u003e Tasks -\u003e android\n    4. Double click on signingReport, it will generate SHA-1\n\nAdd below line in android/build.gradle\n\n    buildscript {\n        repositories {\n            // ...\n            mavenLocal()\n        }\n\n        dependencies {\n            // ...\n            classpath 'com.google.gms:google-services:4.3.2'\n        }\n    }\n\n    allprojects {\n        repositories {\n            // ...\n            mavenLocal()\n        }\n    }\n\nAdd below line in app/build.gradle\n\n    apply plugin: 'com.android.application'\n\n    android {\n        // ...\n    }\n\n    dependencies {\n        // ...\n    }\n\n    // ADD THIS AT THE BOTTOM\n    apply plugin: 'com.google.gms.google-services'\n\n#### For iOS\n\nFollow the steps in [image_picker](https://pub.dev/packages/image_picker) library\n\n### Initialise Firebase\n\n    await Firebase.initializeApp();\n\n#### For Web\n\nAdd Firebase core JS SDK\n\n    \u003cscript src=\"https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://www.gstatic.com/firebasejs/8.6.1/firebase-firestore.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://www.gstatic.com/firebasejs/8.6.1/firebase-storage.js\"\u003e\u003c/script\u003e\n\nAdd Firebase Auth and Analytics JS for google sign-in\n\n    \u003cscript src=\"https://www.gstatic.com/firebasejs/8.6.1/firebase-auth.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"https://www.gstatic.com/firebasejs/8.6.1/firebase-analytics.js\"\u003e\u003c/script\u003e\n\nInitialize Firebase with configuration\n\n    \u003cscript\u003e\n    var firebaseConfig = {\n      // ... your web apps configuration. This is available in your Firebase project settings.\n    };\n\n    // Initialize Firebase\n    firebase.initializeApp(firebaseConfig);\n    firebase.analytics();\n    \u003c/script\u003e\n\nFinally for android and ios\n\n    flutter run\n\nfor web\n\n    flutter run -d chrome\n\n\u003c!-- ##### Please refer to my [blogs](https://ankitsolanki.netlify.app/blog.html) for more information. --\u003e\n\nCheckout [this demo](https://flutter-web-chat.netlify.app/#/) in [Flutter Web](https://flutter.dev/docs/get-started/web).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankit-slnk%2Fflutter_firebase_chat_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankit-slnk%2Fflutter_firebase_chat_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankit-slnk%2Fflutter_firebase_chat_demo/lists"}