How to use mise with FVM?

Naomi Watanabe
2 min readJul 2, 2024

In Flutter, FVM is the primary Flutter version management tool. But what should we do when the monorepo or any other language project is involved? Should we use proper tools respectively?

I recommend using mise in that case.

Here, I focus on introducing how to use mise in FVM project. If you can start the Flutter project with mise, you do not need FVM. You can run the mise use command or add the mise config file and run mise i as well.

Before we get to the main points, describe this tool briefly.

What is mise?

According to the official document, mise, formerly called rtx, is a development environment setup tool, and one of its functionality is this:

mise installs and manages dev tools/runtimes like node, python, or terraform both simplifying installing these tools and allowing you to specify which version of these tools to use in different projects. mise supports hundreds of dev tools.

In short, mise is suitable for people who use various languages and projects with multiple components like front-end, back-end, or something.

If you would like more information, check out the official site!

Let’s get started!

1. Uninstall FVM

Unfortunately, we can not use mise and FVM together. To start using mise, we need to remove FVM:

fvm destroy

or if you installed using pub:

dart pub global deactivate fvm

2. Uninstall Flutter

We will install Flutter using mise and use it in each Flutter project. If you already have the Flutter SDKs installed, remove them to avoid conflict.

rm -rf path/to/flutter
rm -rf ~/.flutter*

Make sure to remove PATH as well.

3. Install mise and Flutter plugin

Mise provides many ways to install, depending on your environment. Please follow the installation steps that suit you. Use Homebrew here:

brew install mise

Then, install the Flutter plugin made by nyuyuyu. Be sure to install a plugin that supports FVM; the one in the mise plugin repositories does not.

mise plugin install flutter https://github.com/nyuyuyu/asdf-flutter.git

Bonus (for VSCode users): Add SDK paths in settings.json:

"dart.flutterSdkPaths": [
"~/.local/share/mise/installs/flutter"
],
"dart.sdkPaths": [
"~/.local/share/mise/installs/flutter"
],

That’s it!

Now, we can use mise with FVM, specifically the FVM config file. Simply running the command mise i works perfectly.

Happy coding!

--

--