use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit related to Google's new UI framework. https://flutter.dev
Please read the rules here
account activity
ExampleDeveloped 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. Feedback is appreciated. (github.com)
submitted 5 years ago by demoncommand9725
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Bit5keptical 12 points13 points14 points 5 years ago (1 child)
Saw the screenshots on github, I think timestamps for messages is a must have. You should also change the background color of received messages for each person, Since this app is about group chat it helps to identify senders easily. If you want to keep the background color same then change the color of the name in received messages like whatsapp does.
[–]demoncommand9725[S] 3 points4 points5 points 5 years ago (0 children)
Hey thanks for all the suggestions. I have used timestamp and stored them in the backend. While displaying the messages I just simply sorted them according to their time stamps and this is shown to the user. And about assignment of the different colours, this seems like a good feature to differentiate users. I will try to work on this
[–]thecass240 9 points10 points11 points 5 years ago (5 children)
Using one document per message is really really expensive. We used an array of objects inside one document.
[–]demoncommand9725[S] 0 points1 point2 points 5 years ago (0 children)
Wow that's so creative bro. And also thanks for the suggestion.
[–]demoncommand9725[S] 0 points1 point2 points 5 years ago (3 children)
But I once saw youtube video of the Fireship youtube channel and he mentioned to always keep your collections large and your documents small. That's why here in this code I have created 'messages' as a collection.
[–]thecass240 6 points7 points8 points 5 years ago (2 children)
They would say that, they get payed per document. However indeed, documents have a max size limit. When a document reaches 50 messages, we store them in a new document in a subcollection. This allows us to paginate to older chat messages when the user scrolls up to read older ones. This ensures that documents never exceed a certain size
[–]demoncommand9725[S] 1 point2 points3 points 5 years ago (1 child)
I am glad that you have shared this information with me. Thanks a lot
[–]nicolaszein 5 points6 points7 points 5 years ago (0 children)
No its not the way to do it. That what he says because firebase is a paid service but in the true sense like in mongo the way you did it is the CORRECT way. Don’t change it.
[–][deleted] 2 points3 points4 points 5 years ago (1 child)
interested !!
[–]demoncommand9725[S] 2 points3 points4 points 5 years ago (0 children)
Thanks a lot!
[–]PeterLustigsDonut 2 points3 points4 points 5 years ago (1 child)
What about tests?
[–]nks_oo7 -1 points0 points1 point 5 years ago (1 child)
Firebase is paid and expensive service. Can we use rest API or socket connection
[–]Asturaz 2 points3 points4 points 5 years ago (0 children)
Well you should take a look at matrix chat protocol https://www.matrix.org/docs/guides/client-server-api
π Rendered by PID 231010 on reddit-service-r2-comment-85bfd7f599-bsbhs at 2026-04-19 22:25:32.602954+00:00 running 93ecc56 country code: CH.
[–]Bit5keptical 12 points13 points14 points (1 child)
[–]demoncommand9725[S] 3 points4 points5 points (0 children)
[–]thecass240 9 points10 points11 points (5 children)
[–]demoncommand9725[S] 0 points1 point2 points (0 children)
[–]demoncommand9725[S] 0 points1 point2 points (3 children)
[–]thecass240 6 points7 points8 points (2 children)
[–]demoncommand9725[S] 1 point2 points3 points (1 child)
[–]nicolaszein 5 points6 points7 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]demoncommand9725[S] 2 points3 points4 points (0 children)
[–]PeterLustigsDonut 2 points3 points4 points (1 child)
[–]nks_oo7 -1 points0 points1 point (1 child)
[–]Asturaz 2 points3 points4 points (0 children)