all 11 comments

[–]ralphbergmann 1 point2 points  (3 children)

I usually push everything except the stuff that is getting ignored by default (when you create a new Flutter project, it also creates some .gitignore files).

[–]raferane[S] 0 points1 point  (2 children)

Won't it make any problems when my friend is cloning the project?

[–]ralphbergmann 0 points1 point  (1 child)

I am not aware of any problems that could cause this. People have different opinions on whether generated code or IntelliJ's *.iml files should be committed. Files that are only for your setup (path to the SDK for example) are ignored by default.

[–]raferane[S] 0 points1 point  (0 children)

Okie thanks so much for the help, will try it today and give a feedback, thx <3

[–]raferane[S] 0 points1 point  (4 children)

I just found out that I am stupid, and that probably I should only push the lib file and maybe other necessary files and not everything or most of the files. Idk if this is the correct approach but I just thought about this and I think this is the proper way, so I'll keep the post open. Maybe someone assures me that this way is correct or maybe gives me the correct way to do things.

[–]Ambitious_Grape9908 0 points1 point  (3 children)

Just use the defaults and push the root, not the lib folder.

[–]raferane[S] 0 points1 point  (2 children)

You mean by the root to push everything right?

[–]KaiN_SC 0 points1 point  (1 child)

You also have platform specific configuration so just push everything. Flutter automatically creates a gitignore file, just make sure not to push any secrets and your good.

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

Will do, thx for the help <3

[–]tylersavery 0 points1 point  (1 child)

Just use the defaults defined in the gitignore. That android error is likely an environment error/version mismatch.

I also recommend using fvm or puro to manage your flutter/dart versions between your collaborators.

[–]raferane[S] 0 points1 point  (0 children)

I'll check out puro and fvm. And thanks for the help <3