[flutter (플루터 앱 개발)]Using Flutter FVM in Windows & MacOS

In Windows:

Before we proceed with FVM, we need to install Flutter itself. Here’s how you can do it:

Step 1: Installing Flutter:

  1. Visit the Flutter website (https://flutter.dev/) and click the “Get Started” button.
  2. Download the Flutter SDK for Windows by clicking the “Windows” button.
  3. Extract the downloaded Flutter SDK ZIP file to a location of your choice. For example, you can extract it to “C:\flutter”.
  4. Add the Flutter SDK to your system’s PATH variable. Open the Start menu and search for “Environment Variables.” Select the “Edit the system environment variables” option.
  5. In the “System Properties” window, click the “Environment Variables” button.
  6. In the “System Variables” section, find the “Path” variable, select it, and click on the “Edit” button.
  7. Click on the “New” button and add the path to the “bin” directory inside the Flutter SDK folder (e.g., “C:\flutter\bin”).
  8. Click “OK” in all open windows to save the changes.
  9. Open a new Command Prompt or PowerShell window and type “flutter doctor” to verify the installation. It will perform checks and display the status of Flutter installation.

Step 2: Installing Flutter Version Management (FVM):

Now that Flutter is installed, let’s set up FVM to manage different Flutter versions efficiently.

  1. Open a Command Prompt or PowerShell window. Run the following command to install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))   

2. Install FVM using Chocolatey, in the same PowerShell

choco install fvm

3. Activate FVM usage globally

flutter pub global activate fvm

4. Configure VSCode to use the current active Flutter SDK version of a project. Add these lines in the Preferences Settings.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

C:\Users\[current_user]\AppData\Roaming\Code\User\settings.json
"dart.flutterSdkPath": ".fvm/flutter_sdk",
"dart.flutterSdkPaths": ["/Users/usr/fvm/versions"],
// Remove .fvm files from search
"search.exclude": {
    "**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
    "**/.fvm": true
}

In MacOS:

Step 1: Installing Flutter:

  • Download the Flutter SDK from the official Flutter website (https://flutter.dev).
  • Extract the downloaded file to a directory of your choice. For example, /Users/your_username/flutter.
  1. Set up Flutter environment variables:
  • Open Terminal and run the following command: open ~/.bash_profile.
  • Add the following lines at the end of the file:
export PATH="$PATH:/Users/your_username/flutter/bin"
export PATH="$PATH:/Users/your_username/.pub-cache/bin"
  • Replace your_username with your actual macOS username.
  • Save and close the .bash_profile file.
  • Run the following command in the Terminal: source ~/.bash_profile to apply the changes.

Step 2: Installing Flutter Version Management (FVM)

  1. Install FVM:
  • Open Terminal and run the following command: brew install fvm.
  • Once the installation is complete, run fvm doctor to verify that FVM is correctly installed.
  1. Set up FVM environment variables:
  • Open Terminal and run the following command: open ~/.bash_profile.
  • Add the following line at the end of the file:
export FVM_HOME=~/.fvm export PATH="$PATH:$FVM_HOME/default/bin"
  • Save and close the .bash_profile file.
  • Run the following command in the Terminal: source ~/.bash_profile to apply the changes.

Setting up FVM and Managing Flutter Versions: With FVM installed, we can now set it up and manage Flutter versions effortlessly.

  1. Create a new directory to store your Flutter projects. For example, you can create a “Projects” directory in your user folder.
  2. Open a Command Prompt or PowerShell window and navigate to the directory where you want to create your project.
  3. Run the following command to initialize FVM:
fvm use stable
  1. This command will download and set up the stable version of Flutter.
  2. To install a different version of Flutter using FVM run this command and change <version> with the intended version. example: 2.5.3
fvm install <version>
  1. Once the process is complete, you can create a new Flutter project using the following command:
fvm flutter create my_flutter_project
  1. Replace “my_flutter_project” with the desired name of your project.
  2. To switch between Flutter versions, you can use the following command:
fvm use <version>
  1. Replace <version> with the desired Flutter version, such as "stable" or "2.5.0".

Conclusion: Installing Flutter with Flutter Version Management (FVM) on Windows allows you to manage multiple Flutter versions

 

[출처] https://medium.com/@iliyass.zamouri/using-flutter-fvm-in-windows-1c23e38bccdb

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
151 [flutter (플루터 앱 개발)] flutter pocketbase 사용법 2탄(회원가입) file 졸리운_곰 2024.06.10 272
150 [flutter (플루터 앱 개발)] flutter pocketbase 사용방법 1탄(초기설정) file 졸리운_곰 2024.06.10 242
149 [게임 일반] 카드 덱 이미지 (트럼프 카드) 졸리운_곰 2024.05.27 224
148 [flutter (플루터 앱 개발)]Flutter - InAppWebview Communication (인앱웹뷰로 웹과 앱 양방향 통신하기, 자바스크립트 커뮤니케이션) file 졸리운_곰 2024.04.13 274
147 [flutter (플루터 앱 개발)] flutter - fvm 적용하기 (Futter Version Management) file 졸리운_곰 2024.04.11 189
» [flutter (플루터 앱 개발)]Using Flutter FVM in Windows & MacOS file 졸리운_곰 2024.04.10 294
145 [flutter (플루터 앱 개발)] Flutter version management in Visual Studio Code with FVM 졸리운_곰 2024.04.10 231
144 [flutter (플루터 앱 개발)] pHp backend with flutter file 졸리운_곰 2024.03.18 350
143 [flutter (플루터 앱 개발)] [Flutter] fvm으로 Flutter 버전 관리 졸리운_곰 2024.03.17 203
142 [firebase v9] 파이어베이스 버전9 시작하기 - firebase v9 file 졸리운_곰 2023.12.24 309
141 [ Firebase ] v9부터 크게 달라진 사용법들 모아보기 file 졸리운_곰 2023.12.24 268
140 [게임 개발 일반] 콘솔은 어려울수록, 모바일은 쉬울수록 '돈' 쓴다 file 졸리운_곰 2023.10.30 264
139 [Unity] How to Create a Metaverse dApp with Unity : Unity로 Metaverse dApp을 만드는 방법 file 졸리운_곰 2023.09.13 397
138 [게임 개발 일반] 게임 초기 기획서 작성 방법 졸리운_곰 2023.07.16 250
137 [GameMaker Studio] Neural Network in Game Maker Studio – part 4 file 졸리운_곰 2023.07.07 462
136 [GameMaker Studio] Neural Network in Game Maker Studio – part 3 file 졸리운_곰 2023.07.07 413
135 [GameMaker Studio] Neural Network in Game Maker Studio – part 2 file 졸리운_곰 2023.07.07 506
134 [GameMaker Studio] Neural Network in Game Maker Studio – part 1 file 졸리운_곰 2023.07.07 378
133 [construct2] HOW TO REMOVE THE SCREEN POWERED BY CONSTRUCT 2? file 졸리운_곰 2023.03.24 266
132 [flutter (플루터 앱 개발)] How to use Flutter’s Rest API file 졸리운_곰 2023.03.21 349
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED