Chat App with Flutter, Dart Frog & WebSockets

Поделиться
HTML-код
  • Опубликовано: 31 май 2024
  • In this Flutter tutorial, we’re going to build a full-stack Flutter chat application with Dart Frog and WebSockets. In our Dart Frog server, we will develop a REST API and a WebSocket to handle the communication between the client and the database.
    GitHub: github.com/maxonflutter/Chat-...
    🚀 Learn Flutter / Build Apps 👇
    🧑‍💻 App dev • www.atomsbox.com
    ✍ Flutter Templates • www.atomsbox.com/templates
    💾 GitHub • www.github.com/maxonflutter
    Key Features:
    - Flutter UIs for the Chat Room, Chat Room List, Login and Splash screen
    - Send and receive messages in the Chat Room
    - Updates to the list of chat room when new messages come in
    - Postgres database with Supabase
    - Login with email and password
    - Login with phone number and OTP
    - Server-side auth with JWT token
    - REST API setup with Dart Frog
    - WebSocket setup with Dart Frog (server) and with web_socket_channel (client)
    00:00 Build a chat application with Flutter & Dart Frog
    07:30 Packages to share code between the client and the server
    10:20 Database set up
    21:40 Custom Dart classes, models
    32:05 Env variable for the Supabase setup
    40:00 Dart Frog: GET data from the database
    50:30 Dart Frog: Custom entry point for the server
    52:30 Flutter UI: Chat Room List Screen, message list, message bubble, message text form field
    01:12:00 API client to connect the Flutter app with the Dart server
    01:25:00 Insert sample data in a Postgres database for the Flutter app
    01:28:35 Set up the WebSocket client in the Flutter app
    01:38:00 Set up the WebSocket handler in the dart_frog project
    01:46:00 Create new messages from the Flutter app
  • НаукаНаука

Комментарии • 59

  • @behappyalways5334
    @behappyalways5334 5 месяцев назад

    your awesome man keep it up!! waiting for p2

  • @mariugomegiani
    @mariugomegiani 6 месяцев назад +2

    Great video! Can't wait for part 2. Question, will you implement notifications? That would be so helpful! Thanks Max!

    • @MaxonFlutter
      @MaxonFlutter  4 месяца назад

      That's work in progress :)

    • @cana_369
      @cana_369 4 месяца назад

      @@MaxonFlutter can't wait .......

  • @mfaizhussain7
    @mfaizhussain7 5 месяцев назад +1

    it looks complicated and interesting at the same time.

  • @kazerdira4704
    @kazerdira4704 2 месяца назад

    hey , please what state management are you planning to use , and thank you

  • @mohammedsayed2203
    @mohammedsayed2203 6 месяцев назад +2

    bro u won't believe that i have been searching for that many times and suddenly u have upload this video omg , i am sure that god have sent u to me

    • @MaxonFlutter
      @MaxonFlutter  6 месяцев назад +1

      Hey Mohammed, I’m glad it’s helpful for you! That’s just the first part though as there are some more features to add 😀

    • @mohammedsayed2203
      @mohammedsayed2203 6 месяцев назад

      @@MaxonFlutter i am waiting for the next part, keep on bro

  • @VithuRatnasingam
    @VithuRatnasingam 2 месяца назад

    Hi Great Tutorial. Learnt a lot. Do you have any timeline as to when will the part 2 be uploaded?

  • @X0oskar0X
    @X0oskar0X 2 месяца назад

    I have one question: can I write a backend in Dart Frog that will isolate each user from each other, i.e. I will create all the logic as factory classes and then use them in webSocketHandler, and it will be able to serve several users simultaneously and independently?

  • @toktar2107
    @toktar2107 4 месяца назад

    Waiting for part 2 !

  • @maximus4244
    @maximus4244 4 месяца назад

    Nice work Max, did you make any tutorials about Firebase in app messaging?

  • @nikhilkukreja8498
    @nikhilkukreja8498 6 месяцев назад

    Do I have to know dart frog if I am starting with this tutorial?

  • @mr.musicx4637
    @mr.musicx4637 5 месяцев назад

    how many part this project have
    ??pls let me know i want to build this for my job project experience

  • @incognito0018
    @incognito0018 15 дней назад

    Instead of dart frog can serverpod and docker be used?

  • @nawara7538
    @nawara7538 5 месяцев назад

    Can I please request the flutter UI design of the app "The New Yorker" eMagazine homepage ? Thank you for what you do !

  • @lacksohmarvin2889
    @lacksohmarvin2889 5 месяцев назад

    Will be good to have one with video and audio call using dart frog too

    • @MaxonFlutter
      @MaxonFlutter  4 месяца назад

      Okay, thanks for the suggestion.

  • @MrCamdere
    @MrCamdere 4 месяца назад

    Bro i cant find the subsscripten for membership ? I want to finish the food Order serie

  • @geetcyberlab5108
    @geetcyberlab5108 6 месяцев назад

    Excellente my friend

  • @law5895
    @law5895 5 месяцев назад

    When will part 2 be released?

  • @Sanjay54251
    @Sanjay54251 6 дней назад

    hi sir good job , i want know with website socket i want to use mysql database please tell me hsoting plan for 1000 cucurrent contion but best but cheap

  • @L-OGOScry
    @L-OGOScry 6 месяцев назад +1

    grande fra

  • @MaxonFlutter
    @MaxonFlutter  3 месяца назад

    🚀 Learn Flutter / Build Apps 👇
    🧑‍💻 App dev • www.atomsbox.com
    ✍ Flutter Templates • www.atomsbox.com/templates
    📱The best chat app template available: www.atomsbox.com/templates/echo-link

  • @inaciol
    @inaciol 6 месяцев назад

    perfect !👋

  • @anandamp5768
    @anandamp5768 3 месяца назад

    Ay Sir thxxx

  • @MuhammadSohailMian
    @MuhammadSohailMian Месяц назад

    Hello sir this was a great tutorial I have ever seen can you help me please?

  • @pedroluzio
    @pedroluzio 5 месяцев назад

    The database.sql that you have on the insert chat_rooms does not work. There is no unread_count in the chat_rooms table

    • @harshbsv
      @harshbsv 5 месяцев назад

      Remove everything below line 64 (the last "ADD FOREIGN KEY" line). Then try to run the same query again. It will work :)

    • @pranayjha473
      @pranayjha473 2 месяца назад

      ​@@harshbsv That was for statring part when i implement api and then run that part by chnging only userId1 and userId2 it giving error so i decided to remove time column and add unread_count column and when i am running now it showing error like this
      Unhandled Exception: Exception: Unexpected error: ClientException with SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 51244, uri=localhost:8080/chat_rooms/id/8d162274-6cb8-4776-815a-8e721ebfb76d/messages
      E/flutter (23425): #0 ApiClient._handleRequest (package:chat_app_part/services/api_client.dart:54:7)

  • @cs_010_adityaverma2
    @cs_010_adityaverma2 4 месяца назад

    part 2 please asap

  • @hiteshkumaryadav8373
    @hiteshkumaryadav8373 27 дней назад

    bro please complete the project.

  • @vlknkc
    @vlknkc 6 месяцев назад +1

    Good tutorials, Will you add english subtitles ?

    • @MaxonFlutter
      @MaxonFlutter  6 месяцев назад

      They should be auto-generated by RUclips 👀

  • @reymartdechavez6983
    @reymartdechavez6983 6 месяцев назад

    Will you integrate Flutter Bloc on this project?

  • @user-zs5re2tg6s
    @user-zs5re2tg6s 3 месяца назад +1

    I can't get access to the next videos. What exactly should i do?

    • @GuestAcc_1
      @GuestAcc_1 9 дней назад

      You need to buy membership.

  • @saifuraja8795
    @saifuraja8795 6 месяцев назад

    Bro do you have any else video for dart frog?

    • @MaxonFlutter
      @MaxonFlutter  6 месяцев назад

      Hey there! Yes, check the latest video section on my channel. There is one about building a grocery shopping app that uses dart frog, too.

  • @anasraees5980
    @anasraees5980 6 месяцев назад

    Love from India..
    I need help...
    I am getting xCode error..
    Multiple command produce.
    How can I solve?

    • @MaxonFlutter
      @MaxonFlutter  6 месяцев назад +1

      I need a bit more information to help 😀. Can you share the full error code and when is it happening?

    • @anasraees5980
      @anasraees5980 6 месяцев назад

      @@MaxonFlutter I got these errors:
      Multiple commands produce '/Users/cdp/Library/Developer/Xcode/DerivedData/Runner-ayqoasgvdrsgbxanngavrzhllndk/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/OneSignalInAppMessages.framework'
      And
      Error (Xcode): Multiple commands produce
      '/Users/cdp/Desktop/Anas/bcic/build/ios/Release-iphoneos/Runner.app/Frameworks/OneSignalInAppMessages.framework'
      I upgrade my flutter version and then run my project so I got this on both Android studio and xcode.
      I read so many articles please help

    • @anasraees5980
      @anasraees5980 6 месяцев назад

      Please reply 😭

  • @vigneshs8252
    @vigneshs8252 4 месяца назад

    Hey looking to build a similar app can you help me do this as a paid task

    • @MaxonFlutter
      @MaxonFlutter  4 месяца назад

      Hey there, feel free to contact me at massimo@atomsbox.com

  • @hiteshkumaryadav8373
    @hiteshkumaryadav8373 27 дней назад

    how to chat with multiple users.

  • @muhammedkacmaz3978
    @muhammedkacmaz3978 6 месяцев назад +3

    Do you have a chance to add subtitles?that would be great

    • @MaxonFlutter
      @MaxonFlutter  6 месяцев назад +1

      They’re being processed by RUclips! Probably they’ll be available in a few hours 😀

    • @muhammedkacmaz3978
      @muhammedkacmaz3978 6 месяцев назад

      Haha, I didn't know that :D@@MaxonFlutter

  • @moein9213
    @moein9213 3 месяца назад

    Member only? realy? I am from fu... Iran and I can not purchase because I have not credit card...
    I am familiar with all the topics and I just wanted to see the socket manager on the server side

  • @PaoloTshiyole
    @PaoloTshiyole 5 месяцев назад

    Good video like every time
    Would you make for us, a Stripe payment and subscription video with Flutter Web as the 2024 gift 🎉 please, there's no the single video in RUclips... And you're the best flutter RUclipsr

  • @chukwuekusunday
    @chukwuekusunday 3 месяца назад

    Can you turn into tinder clone,supabase is nice

  • @gelsonmatavela
    @gelsonmatavela 2 месяца назад

    good video. But when i'm running the database script a getting some erros "bugs"
    ERROR: 42703: column "unread_count" of relation "chat_rooms" does not exist
    LINE 68: INSERT INTO chat_rooms (id, last_message_id, unread_count)
    and i don't know how to solve it! Please, help me! From Mozambique (Africa)

  • @sagar1garg
    @sagar1garg 2 месяца назад

    How to disconnection and reconnection in websockets? Kindly show a more advanced implementation of websockets more suited to production use please @maxonflutter

    • @MaxonFlutter
      @MaxonFlutter  Месяц назад +1

      Sure, I might release that in the future. Thanks for the suggestion.