31.62 Flutter Style Gitignore

20240103

The basic principle is that if a file is automatically generated and does not require any manual changes, then do not put the file under version control. Below we consider specific cases.

pubspec.lock

General advice is to include this in version control for app development but not package development. Specific combinations of package versions are recorded here, whereas pubspec.yaml records general version constraints. However, for a team this will change automatically and without explanation or the expectation of specific developers. It is always regenerated when required. So I tend not to place it under version control until the app is ready for release.

linux/flutter/generated_plugin*

The three generated_plugin files for linux will be automatically generated by flutter if they don’t exists and do not need to be version controlled. Their content is updated by specific flutter packages that require operating system specific support for some plugins, including the flutter packages screen_retriever, window_manager, and url_launcher.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0