Last active
June 7, 2022 03:39
-
-
Save gabrc52/ec0ea109322c816e7a81f0f58afabd24 to your computer and use it in GitHub Desktop.
NOTE: THIS GIST IS OUTDATED AS FLUTTER NOW SUPPORTS `flutter run` ON DESKTOP ///////// A simple way of running/reloading a Flutter app on Linux with VS Code using flutter-desktop-embedding (place files in `flutter-desktop-embedding/example/linux`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
project_location=$(pwd) | |
pushd "$(dirname "$0")" # It expects to be placed in flutter-desktop-embedding/example/linux | |
mkdir $project_location/.vscode | |
\cp launch.json $project_location/.vscode/launch.json -f # From https://github.com/google/flutter-desktop-embedding/blob/master/Debugging.md , backslash was added because my distro aliases cp to cp -i | |
ln -T -s -f $project_location ../flutter_app | |
pkill flutter | |
make && \ | |
out/flutter_embedder_example & | |
popd | |
sleep 1 | |
xdotool key F5 |
Additionally, you can use KWin Application rules to make Flutter be always on top and a certain size and position.
it would be cool to have full instructions step by step how to compile / link to flutter desktop embedder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added a keybinding to this script with the
terminal-command-keys
plugin: