0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

FVMがいつのまにかPubから独立していた話

Last updated at Posted at 2024-12-24

はじめに

この記事は、Qiita Advent Calendar 21日目の記事です。
以下の記事より、すべての記事をご覧になれます。

本編

以前Flutterを用いて開発していたアプリがありまして、そちらはFVMでFlutterを開発していました。

FVMは、Flutterのバージョンを管理してくれるツールで、元々はPub経由で僕はインストールしていました。しかし、この度新しく環境を用意しなおさないといけなくなったため、新たにFVMをインストールしようとFVMのホームページを見ると、、、。見事に変わっているじゃないですか!

Mac/LinuxでのFVMの入れ方

MacとLinuxの場合、マニュアルでのインストールまたはHomebrewでのインストールの2種類があります。

マニュアルでのFVMのインストール

curl -fsSL https://fvm.app/install.sh | bash

HomebrewでのFVMのインストール

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap leoafarias/fvm
brew install fvm

WindowsでのFVMの入れ方

Windowsの場合、chocoが必要です。

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install fvm

使い勝手

使い勝手は以前のものと変わらないですが、これでFlutterの生存の有無に関わらずFVMが使えるようになりました。ちなみに、僕はFVMを使う時にいちいちfvm flutterと入力するのはとてもめんどくさいので、僕はZSHでAliasを設定しています。

alias "flutter"="fvm flluter"
alias "dart"="fvm dart"

ぜひ参考にしてみてください!

最後に

今回は、少し軽めの記事になりましたが、FVMにつれて触れてみました。そういえば、LinuxでHomebrewって使ったことないなぁ、、、。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?