Old iron remember to forward, Brother Mao will present more Flutter good articles~~~~

WeChat group ducafecat

b station https://space.bilibili.com/404904528

original

https://medium.com/flutterdevs/version-management-in-flutter-c232b04f1919

refer to

text

Flutter is a portable UI toolkit. In other words, it is a comprehensive application software development kit (SDK), including widgets and tools. Flutter is a free and open source tool for developing mobile, desktop and web applications. Flutter is a cross-platform development tool. This means that with the same code, we can create ios and android applications at the same time. This is the best way to save time and resources throughout the process. In this regard, hot reload is gaining support from mobile developers. Allows us to quickly view the changes implemented in the code through hot reinstallation.

The Flutter management version allows different types of Flutter versions to be available on a project basis. This means that we can define specific types of Flutter versions for different types of projects, and it allows us to release multiple channels, cache it locally, and therefore switch versions. Then we don't have to wait for the installation.

In this article, we will learn Flutter version management. Here, we will see how to establish a working version to manage jitter. let us start. let us start.

Version management (FVM)

When working on a Flutter project, you need to release updated Flutter and applications, verify them, and switch different types of software development kits for testing, which takes time. To avoid this, we use Flutter version management, which provides us with different types of Flutter versions of our machines. Therefore, every time Flutter can test the application for the updated Flutter version without waiting for installation, it will be able to switch to the Flutter version accordingly.

Install

First, you need to determine whether Flutter has been installed and whether Flutter is a stable channel. If not, type the following code in the command line.

// set flutter to stable channel
flutter channel stable// check flutter channel
flutter channel// output
Flutter channels:
  master
  dev
  beta
* stable

After this, we must determine whether our Flutter has been installed or not, if not, then first we will install FVM

$ pub global activate fvm

step Now we will see some warnings given at the end of the installation process, so we need to add the fvm path to the shell configuration file (. Before proceeding to the next step, please use bashrc, bash_profile, etc.

export PATH=”$PATH:`pwd`/flutter/bin”$ fvm install
export PATH=”$PATH:`pwd`/bin/cache/dart-sdk/bin”
export PATH=”$PATH:`pwd`/.pub-cache/bin”

SDK release notes

DVM allows us to install multiple types of Flutter release or channel installation channel use stable and install Flutter release version we will use v2.0.5 or 1.17.0-dev. 3.1 and once we run-skip-install, it will skip the installation

$ fvm install stable or fvm install 2.0.5

Project Config SDK Version

After this, we will see that regardless of whether the project is configured to use a specific version, if not, we will install it on the appropriate version without parameters.

$ fvm install

List of installed Flutter versions

Now, by entering the following command, we can list the installed version on our machine by using the following command FVM will store the SDK version.

$ fvm list

Upgrade SDK version

When using the upgrade SDK version command, we need to upgrade our current SDK version, so you must call your Flutter SDK command as a normal Flutter installation.

$ fvm flutter upgrade

Setting up the IDE

Now let's take a look at how to configure the IDE. Below we show how to configure it in android studio and VS Code. Now let's take a look.

  • Android Studio

Copy the following absolute symbolic link in the root project directory.

Example: /absolute/path-to-your-project/.fvm/flutter_sdk

Then we will open Languages and Frameworks-> Now search for flutter or flutter and change the path to flutter SDK in the menu of Android Studio. Then implement the changes. Now you can run it with the selected version of Flutter and debug it. If you want to see the new settings, then we can use Android Studio to restart.

  • VS Code

Now we will configure VS Code here and we will see how to complete the VS Code process.

The path of the directory, we can see all the versions installed by FVM in the code

"dart.flutterSdkPaths": ["$YOUR_PATH/fvm/versions",],

In order to get the above path, we will execute the fvm list command

// copy this path
Versions path:  $YOUR_PATH/fvm/versions

Type cmd + shift + p to use the sdk, then type change sdk, now you can choose the version you like.

Summarize

In this article, I made a simple explanation of version management. You can modify and experiment with it according to your needs. This simple introduction comes from version management of Flutter.

I hope this blog will provide you with sufficient information about trying to manage the Flutter version. We showed you Flutter to explore version management and work in your Flutter app, so please try it.


© Cat brother

https://ducafecat.tech/

https://github.com/ducafecat

Past

Open source

GetX Quick Start

https://github.com/ducafecat/getx_quick_start

News client

https://github.com/ducafecat/flutter_learn_news

strapi manual translation

https://getstrapi.cn

WeChat discussion group ducafecat

Series collection

Translation

https://ducafecat.tech/categories/%E8%AF%91%E6%96%87/

Open source project

https://ducafecat.tech/categories/%E5%BC%80%E6%BA%90/

Dart programming language basics

https://space.bilibili.com/404904528/channel/detail?cid=111585

Getting started with Flutter zero foundation

https://space.bilibili.com/404904528/channel/detail?cid=123470

Flutter actual combat from scratch news client

https://space.bilibili.com/404904528/channel/detail?cid=106755

Flutter component development

https://space.bilibili.com/404904528/channel/detail?cid=144262

Flutter Bloc

https://space.bilibili.com/404904528/channel/detail?cid=177519

Flutter Getx4

https://space.bilibili.com/404904528/channel/detail?cid=177514

Docker Yapi

https://space.bilibili.com/404904528/channel/detail?cid=130578


独立开发者_猫哥
666 声望126 粉丝