Search code examples
flutterlicensing

License of Flutter default template


When one run flutter create <project_name>, one will get a template project in <project_name>. It is very easy. However, one cannot easily know the license of the files automatically generated. Then my question is what the license is, and whether it is really legal (though many people may not care this problem) to add license without any notice about the license of the auto-generated files.

Here is my observation. In default, the flutter command-line tool selects the app template. The app template is here in the flutter repository. Also the directories other than lib/ (like android/ and test/) should have come from other templates or suchlike. Logically speaking, the auto-generated files should be under the license of Flutter, BSD-3-Clause license (ref: LICENSE).

However, if one who are developing an app with Flutter under other licenses (like MIT or GPL) have to state in the LICENSE file that some files are under the BSD License, it seems to be very troublesome.


Solution

  • Default License: BSD-3-Clause. The Flutter SDK is licensed under the BSD-3-Clause license. This means that the code you develop after using flutter create receives this license as well.

    Including Licenses: In case you are building an application with users who voluntarily want it to be released under another license (distract like MIT or GPL), you are the one who has to take care about the users, regarding all the other third-party coded components used within your application. This particularly covers the Flutter generated files.

    License in Your Project: Even though you will be able to publish your application under another license other than that used, there will be an inclusion of one sub section in your LICENSE file or a separate LICENSES file on the use of Flutter and its BSD-3-Clause license. This is a common practice in open-source projects to address any licensing issue within the individuals or organizations involved.

    No Automatic Notices: In the same way, Flutter does not give any mandatory licensing notice when project files are generated. It’s a good practice to ensure that this fact is not neglected and every practical manner that legally outlines licensing of a project is fully embraced.

    Maintaining Clarity: You may help enhance clarity by including in your project the licenses for all dependencies and any files generated. In this way, if your project is used by someone else, they will understand which parts are licensed mean under what rights.