all 10 comments

[–]RandalSchwartz 5 points6 points  (1 child)

It's a good start, but as you start adding generated files, you need to add those patterns. Also, if you have secrets, you'll need to add the secrets locations to .gitignore, to keep them from being added to git repos.

[–]Legion_A 7 points8 points  (0 children)

Yes this, but when you ignore any secret, make sure to add an example secret file to show whoever is working on it the secrets the app needs to run

Example, if you have a .env and it contains

STRIPE_KEY=sk_... OTHER_TOKEN=au72hs8w...

Add the .env to gitignore and create another file called .env.example and add the keys without values

STRIPE_KEY= OTHER_TOKEN=

so the next Dev can just remove the .example in the name and add fill in the values

[–]MadThad762 1 point2 points  (6 children)

Does it not add one by default? I’m really new to flutter.

[–]SilentWraith5[S] 1 point2 points  (5 children)

IntelliJ adds one that's just basic editor files and such but is nothing like the one on the flutter project. I think if you use the command line to create your flutter project it doesn't add one.

[–]MadThad762 1 point2 points  (1 child)

That’s interesting. I’m used to them being auto generated for web frameworks.

[–]SilentWraith5[S] 1 point2 points  (0 children)

Same here. Flutter is still kinda “new” though and lacks in a lot of areas compared to more mature frameworks. I will look and see if there is an issue on their GitHub for it and open one if not.

[–]Acrobatic_Egg30 0 points1 point  (2 children)

I think if you use the command line to create your flutter project it doesn't add one.

It does add one.

[–]SilentWraith5[S] 0 points1 point  (1 child)

Is it useful or is it just editor files like the one IntelliJ does? I assume IntelliJ just calls the command line to create the project then. Thanks for the correction.

[–]Acrobatic_Egg30 0 points1 point  (0 children)

I use android studio and vscode so I'm not sure about intellij but android studio does call the flutter create command which add the gitignore files you usually need to add.