Pubspec. yaml is the core configuration file in the FLUTTER framework project. A package.json configuration file similar to Node.

The configuration items include:

  1. Name: this is the name of the package when import: package is introduced

  2. If name is flua, import ‘package:flua/…….. when importing the package ‘;

  3. This name is also used by others when releasing the Flutter plugin.

  4. Version: 1.0.0 + 1

  5. The entire version corresponds to the versionName and versioncode in Android.

  6. The part before the + sign corresponds to the versionName, which is only displayed to the user. For example, the user can view the current APP version on the Android phone, and the APP version seen here is the value of versionName

  7. The part after the + number corresponds to the versioncode, which is provided to major app stores and program systems, etc., and is used for app upgrade.

  8. Both versions need to be added each time.

  9. Scenario 1: If versionName is not added but versionCode is added automatically, the latest version is 1.2.0. Versioncode is presented to the app store as 3; Suppose A app store does not upload the latest 1.2.0 app with versionCode 2. After downloading and installing store A, the user finds store B, but the versionname of store B is also 1.2.0; But versioncode is 3; At this point, store B has uploaded the latest app. At this point, the APP will be prompted to upgrade. (Go to the App store and find an old version of an app that you already have installed on your phone, and you’ll see updates in the app.) But I’m showing the user why I need to upgrade from 1.2.0 to 1.2.0 when I’m already the latest version of 1.2.0. Therefore, the name and code will be incremented each time a version is issued, regardless of size.

  10. Scenario 2: If versionCode is not added, the versionName is added, and the versionCode version remains the same. Because the application update is not aware of versioname.

  11. Remember: increase each edition. No matter the size of the print.

  12. Enenvironment:Dart and FLUTTER version control ranges can be set.

    The SDK represents the dart SDK’s version control scope. A flutter represents the range of version control of the FLUTTER SDK. Dart and flutter versions of the dependencies below are also limited here.

  13. depenndencies: Online dependencies are shown

The SDK here refers to the dependencies that a flutter or flutter_localizations must exist in your installed Flutter SDK and are subject to the version of the Flutter SDK. If the dependencies do not exist in the Flutter SDK, an error will be reported when the dependencies are updated. As follows:

* * the location of the mark 2: * * version constraints, such as ^ 1.2.0 equivalent > = 1.2.0 < 2.0.0 (does not contain 2.0.0); For example ^0.2.2 >=0.2.2 <0.3.0

** Can be set to any without setting the specific version, but the version range is also limited by the SDK for enEnvironment Settings. Download dependencies that depend on the enEnvironment SDK version-wide

  1. How dependencies are introduced

  2. This can be referenced by registering in pub.dev.

  3. Reference from your own repository

  4. Through the local directory

  5. Using Git

Dev_dependencies Develops dependencies in the same way as dependencies.

  1. Flutter:

  2. Assets: Configuration of resources, such as pictures, fonts, ICONS, etc.

Note: If you want to import resources as folders, be sure to add a ‘/’ at the end of the configuration;

Note: Fonts have a weight property in them. According to the official document, I set the weight to 700, the default font weight is 700, but there is no change. You can try it out, and if I don’t get this right, let me know.

— Still learning the little white in Flutter