Flutter Wrapper to get the following benefits:
- Standardizes a project on a given Flutter version, each Flutter project has its own version of Flutter SDK
- Provides the same Flutter SDK version for different users and execution environments in a Flutter project
Flutter Wrapper contains the following files:
The layout of the Flutter project with
Wrapper is as follows:
The Wrapper properties file, stores the information about the Flutter distribution. It contains the repository url and version of Flutter SDK.
flutterVersion can be a branch name or a tag name
Using a private repository：
The Flutterw script file, a shell script and a Windows batch script for executing the build with the Wrapper.
Generating the Wrapper files requires an installed version of the Flutter runtime on your machine as described in Installation.
flutter create to create a new Flutter project. The Flutter project will include the
Wrapper files automatically.
Executing the wrapper command generates the necessary Wrapper files in the Flutter project directory.
Running the Wrapper task
$ flutter wrapper
Wrapper will download the required Flutter SDK version automatically.
flutterw is almost the same as using
flutter. Depending on the operating system you either run
flutterw.bat instead of the
Executing the build with the Wrapper batch file in Flutter project:
$ flutterw.bat build
Executing the build with the Wrapper shell file in Flutter project:
$ ./flutterw build