One thing you need to consider when designing your #Firestore database is how much data you'll need to build each document reference.

This will be important if you ever add notifications to your #flutter app since the notification should bring the user to a relevant screen.
For example, say you have the following collections:

Users -> Posts -> Comments

And you want to notify a user about a comment on their own post. In this case, the notification will only need the post ID and the comment ID since we can infer the user ID.
But what if you wanted to notify a user about a reply to their comment on someone else's post?

You'd need to send all 3 IDs so your app can resolve the destination.

Alternatively, you could flatten the database so that users, posts, and comments are top-level.
I think there are arguments for each structure but it's something you should keep in mind early on.

Thoughts or preferences?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Joe Muller

Joe Muller Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Mullr33

22 Sep
Interested in setting up a mentioning system in your social networking app?

Here's a short thread on how I've implemented one in #Flutter.

I've included code snippets, important packages, and some tasty tech tips. Check it --> 🧵

#appdevelopment #cs
First, you'll want to make sure that each username is formatted correctly.

For implementing "mentions" like Twitter, your usernames cannot have spaces.

This lets you tag users in posts by typing the at-sign and then the name. Examples: @NoboxApp, @ParaSightApp, @BigIdeaski
In #Flutter you can prevent spaces using the FilteringTextInputFormatter and setting the maxLines property to 1.

This maxLines setting prevents new line characters.

@carbon_app TextFormField(   focusNode:...
Read 9 tweets
26 Mar
A thread on how I managed to encrypt and store a video using #Flutter

Scroll for links, code snippets, and my general thought process...
Recording and saving videos locally isn't too difficult.

Dependencies:
- camera
- path_provider

#flutter #android #s21 #video #coding

Below is the code for getting a file reference:

Created with @carbon_app   /// One call to get a file reference, set temp = false to
Encryption on the other hand is a foreign language to me. From my research, I learned that each user needs an #AsymmetricKeyPair that can be used to #encrypt and #decrypt data.

To generate these, I used the rsa_encrypt package.

pub.dev/packages/rsa_e…
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(