Skip to content

Instantly share code, notes, and snippets.

@vicenterusso
Last active July 20, 2023 22:08
Show Gist options
  • Save vicenterusso/a74c1803353f25b3a5c45ca30a6f554f to your computer and use it in GitHub Desktop.
Save vicenterusso/a74c1803353f25b3a5c45ca30a6f554f to your computer and use it in GitHub Desktop.
Flutter Linux build setup on Fedora

Terminal commands

sudo dnf install cmake

sudo dnf install ninja-build

sudo dnf install clang

sudo dnf install gtk3-devel

# maybe not
sudo dnf install jsoncpp-devel

# because flutter_secure_storage
sudo dnf install libsecret-devel

Add Platform

Run:

fvm flutter create --platforms=linux

Bugfix

add to linux/flutter/CMakeList.txt:

IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  SET(CMAKE_INSTALL_PREFIX "/home/<your-user>/bin" CACHE PATH "install prefix in home bin" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 

Run:

fvm flutter clean && fvm flutter packages pub get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment