The chat app made by Flutter and Firebase

Overview

Chat Demo

Description

Extension

Screenshot

How to run

  • Clone this repo
  • Run flutter packages get
  • Run flutter run (remember open simulator or connect physical device, iOS auto run additional command pod install)

Big update

  • Jun, 4th, 2021 - Migrating to Flutter 2 and using Dart sound null safety
  • Oct, 2th, 2021 - Apply provider & restructure
Comments
  • Allow notifications

    Allow notifications

    Hi @duytq94

    Can you please advise how can we add the message notifications using the firebase messaging? I guess it will get the messages we store right?

    opened by FilipeOS 15
  • does not load further page after pressing

    does not load further page after pressing "Sign in with google"

    does not load further page after pressing "Sign in with google". onPressed "Sign in with google does not work out and thus does not move to next page.....?

    opened by Aakash-DD 15
  • App is not running

    App is not running

    Why cant i run the project ?

    E/flutter ( 7521): [ERROR:flutter/shell/common/engine.cc(149)] Could not prepare to run the isolate. E/flutter ( 7521): [ERROR:flutter/shell/common/engine.cc(114)] Engine not prepare and launch isolate. E/flutter ( 7521): [ERROR:flutter/shell/platform/android/android_shell_holder.cc(136)] Could not launch engine in configuration.

    the error message

    opened by davigun 12
  • Inconsitency in group chat id in different platforms

    Inconsitency in group chat id in different platforms

    Hi,

    I wanted to highlight an issue. The way group id is being generated doesn't guarantees uniqueness when same chat app is opened in two different platforms. Code reference: https://github.com/duytq94/flutter-chat-demo/blob/c6ef5ba16ef02392b8bb2dd4f775bb4eb32858a2/lib/pages/chat_page.dart#L98

    I've tested it in flutter-android and flutter-web platform and following are the different hascodes it generates:

    Android:
    myId hashCode: 796431288
    peerId hashCode: 871147166
    generated groupId: qe7zrSoyJuPH4mf6uxpXwr5jRF33-QwodOOpFVVQAFWabU02IBxXiirV2
    
    Web:
    myId hashCode: 246537070
    peerId hashCode: 58733319
    generated groupId: QwodOOpFVVQAFWabU02IBxXiirV2-qe7zrSoyJuPH4mf6uxpXwr5jRF33
    

    Because of this user is not able to see the chat messages generated from different platform.

    Thank you, Kartik

    opened by KartikShrivastava 8
  • Question: (Design related) Recommended way of Firebase[Firestore][Auth] instance state management.

    Question: (Design related) Recommended way of Firebase[Firestore][Auth] instance state management.

    Hi, Thanks for putting up this great project. I'm a bit new to flutter(mobile app development) and seeing your project a bit surprised that you're not using any external package for state management. Like I've seen most people are using provider or redux or BLOC to decouple network logic from UI. And in this project most Firebase functionality is coupled with UI. So, for a project which is supposed to scale what is the recommended way? Is the design which you've chosen is good for large scale apps too? Or are there any caveats?

    opened by KartikShrivastava 7
  • firestore stoarage

    firestore stoarage

    Uploaded images doesn't seem to show at the frontend simply at the Users end, but it does show at backend(firebase storage). Any thought why that's happening?

    opened by pojoba02 7
  • Getting image from Firebase Storage

    Getting image from Firebase Storage

    Hi,

    How can I get the uploaded image?

    Basically I don't know how to get that specific image we uploaded (using the time since epoch) and delete it..

    With text is easy but on firestorage I'm not being able, please advise and thank you.

    opened by FilipeOS 5
  • A transaction object cannot be used after its update callback has been invoked.

    A transaction object cannot be used after its update callback has been invoked.

    Very good demo!

    When I send a chat message, I got the below error.

    java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$4.done(AsyncTask.java:399) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

    Caused by: java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction object cannot be used after its update callback has been invoked. at com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore@@21.3.0:46) at com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore@@21.3.0:31) at com.google.firebase.firestore.core.Transaction.ensureCommitNotCalled(com.google.firebase:firebase-firestore@@21.3.0:246) at com.google.firebase.firestore.core.Transaction.write(com.google.firebase:firebase-firestore@@21.3.0:241) at com.google.firebase.firestore.core.Transaction.set(com.google.firebase:firebase-firestore@@21.3.0:105) at com.google.firebase.firestore.Transaction.set(com.google.firebase:firebase-firestore@@21.3.0:91) at com.google.firebase.firestore.Transaction.set(com.google.firebase:firebase-firestore@@21.3.0:67) at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$7.doInBackground(CloudFirestorePlugin.java:688) at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$7.doInBackground(CloudFirestorePlugin.java:682) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  at java.lang.Thread.run(Thread.java:919) 

    opened by wann2 4
  • Message delivery report/status

    Message delivery report/status

    Hi, I want to know the best possible way to implement message delivery report (like delivered, seen) which will be shown to sender for every message.
    Please provide me an idea what I have to do in firestore and in client (user) side.

    opened by harshapulikollu 4
  • Issue with notifications

    Issue with notifications

    Hi @duytq94

    I have an issue and I need your help.

    Notifications work nice BUT if you login with another user you will still get notified of that other user.

    For example you login with A and logout, if you send a message from B to A, you will get both. In my case I'm using the same notification to display add requests.

    Can you advise please?

    I tried this on logout but don't work:

    final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
        await flutterLocalNotificationsPlugin.cancelAll();
    
    opened by FilipeOS 3
  • error in sign

    error in sign

    D/Surface ( 6720): Surface::disconnect(this=0x713117a000,api=1) E/flutter ( 6720): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter ( 6720): PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null) D/WindowClient( 6720): Remove from mViews: DecorView@5e372b2[SignInHubActivity], this = android.view.WindowManagerGlobal@c0f268f

    console messages

    opened by mishubham 3
  • Changing firebase credentials

    Changing firebase credentials

    Hi , the demo works out of the box perfectly, but when we change the google plist in iOS it crashes on clicking sign on button.

    Is there any specific thing to do or seed the database on my firebase account initially to start using the app ?

    opened by thayub 1
  • Add an E2EE functionality:

    Add an E2EE functionality:

    You could achieve this by adding a diffie-hellman key exchange. I would advise changing the generated key every couple of messages for extra security.

    opened by CodeSlayer10 1
  • Firebase function error

    Firebase function error

    Hello, I created a chat application using your code and used the firebase function but there is no notification when you send a message to each other. I get an error "Cannot find pushToken" on the console. How Can I Solve This?

    opened by canxx99 1
  • How to delete chat history for user ?

    How to delete chat history for user ?

    Hi,

    i am making groupchat id like this. if (currentUserId.hashCode <= peerId.hashCode) { groupChatId = '$currentUserName-$peerName'; } else { groupChatId = '$peerName-$currentUserName'; }

    I want to delete entire chat history for user one side, not for both ends. Eg. I am current user, i want to delete my history only, not peer user history like whatsapp. If i use delete method, it will delete entire coversation of both ends. But i need only from my end, keeping at peer user conversation.

    How can i acheive it ? Please help me on this.

    opened by MaheshPeri19 0
Owner
Duy Tran
Duy Tran
A powerful Flutter chat UI component library and business logic for Tencent Cloud Chat, creating seamless in-app chat modules for delightful user experiences.

<style> .button-9 { appearance: button; backface-visibility: hidden; background-color: #1d52d9; border-radius: 6px; border-width: 0; box-shadow: rgba(

Tencent Cloud 63 Aug 11, 2023
Chat-App - A Chat App with flutter and Firebase and Video Calling using WebRTC

chat_app A chat app with flutter and firebase with image message support and vid

Reza Hosseinypour 10 Nov 23, 2022
Chat-application - Build Chat Application using Flutter and Firebase

Build Chat Application using Flutter & Firebase Source Code - Enjoy ! Social Med

Muhammad Irvan 0 Jan 3, 2022
A Chat App Made Using Flutter and Firebase

?? ChatX A Simple Group Chat App Made Using Flutter And Firebase This is a Chat Application where the user can sign-up/log-in either via Email Authent

TRIPARNO CHATTERJEE 6 Aug 26, 2022
The chat app made by Flutter and Firebase

Chat Demo Description A chat app made by Flutter and Firebase. Support login with google account, chat with any user, send text, image and sticker, up

Duy Tran 1.4k Jan 3, 2023
Dio desafio chatonline flutter firebase - Developing an Online Chat Application Integrated with Firebase

Desenvolvendo um aplicativo de Chat Online integrado ao Firebase Descrição Neste

Yian Zaratin 1 Jan 4, 2022
The most complete Chat UI for flutter highly customizable and helps developing chat UI faster.

⚠️ Dashchat v2 is available in v2 branch ⚠️ You can open issues for the v2 to indicate things we need to implement/fix. Also the API can change until

Fayeed Pawaskar 432 Dec 11, 2022
Developed a Group chat application using Flutter and Firebase, where users can register and create groups or join already existing groups and start conversing with each other.

GroupChatApp About Developed a Group chat application using Flutter and Firebase, where users can register and create groups or join already existing

Ahmed Gulab Khan 221 Dec 1, 2022
Chatting-App - A Simple chat app built with Flutter/Dart and Firebase

Chat App By Flutter & Firebase ?? ✨ A Simple chat app built with Flutter/Dart an

Eng.Shahad 1 May 20, 2022
Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service.

chat_app Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service. Resource video 0.1 Sign In and Register page

boraygen 2 Oct 4, 2021
A chat App built with flutter and firebase as backend

chat_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Alfi Mostak 0 Dec 3, 2021
Chat App Built With Flutter And Firebase

Chat App with Firebase - Flutter Preview video: https://youtu.be/bS5tkTDqFqU My

SANGVALEAP VANNY 54 Dec 14, 2022
let's build a mobile chat application using flutter and firebase

miichat A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

azzouz abdelhakim 2 Oct 7, 2022
A chat application using Flutter and Firebase.

flutter_chat_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Le Van Thuan My 2 Apr 7, 2022
flutter chat app with firebase

flutter_chat_app flutter chat app Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

jy.ryu.jiyoung 1 Nov 21, 2021
Build A Chat App With Flutter & Firebase

Build A Chat App With Flutter & Firebase - Flutter Create a chat application wit

Behruz Hurramov 0 Dec 27, 2021
Fully Functioning Chat App with Flutter & Firebase

flutterchat A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Mahdi 3 Aug 26, 2022
Building a Chat App with Firebase, Image Upload, Push Notifications

chat_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Trần Văn Nguyên 2 Nov 15, 2021
Social Media Chat application based on mail and made with flutter

gossip_box A Social Media Chat app Based on mail built with flutter, dart and firebase. Here you can see the demo video: PS: This is created with fire

V Nagasai 5 Jun 22, 2022