A customised Toolbx image that includes everything necessary to develop with Flutter.
Like with many development environments, Flutter requires the installation of a bunch of components that quickly make a mess of your OS. Toolbx is a tool for spinning up containers to be used as interactive environments.
Stuffing all of Flutter's "stuff" in a container allows us to keep our computers clean and tidy 😁 and stops Flutter packages and dependencies causing havoc with everything else we have on our computers 👀.
- Toolbx (natch), which comes pre-installed on Silverblue.
- On Fedora:
dnf install toolbox
- On Fedora:
- libvirt must be installed on the host:
- Silverblue:
rpm-ostree install libvirt
(then reboot) - Fedora:
dnf install libvirt
- Silverblue:
- Owen Taylor's Toolbox VS Code Integration is recommended..
- ..as is the Visual Studio Code Flatpak.
toolbox create -i docker.io/jamesbelchamber/flutter-toolbx
toolbox enter flutter-toolbx
(from within the the toolbox)
First, download the relevant system image and associated platform (you can see the options by running sdkmanager --list
):
sdkmanager "system-images;android-32;google_apis;x86_64" "platforms;android-32"
Then create an avd (Android Virtual Device):
avdmanager create avd -n Pixel_5_API_32 -k "system-images;android-32;google_apis;x86_64"
Finally, use the emulator to start the device:
/opt/android/emulator/emulator @Pixel_5_API_32
See the sdkmanager, avdmanager and emulator pages of the Android Studio User Guide for more details.
Simply run code .
from the directory that contains the Flutter project!