GitHub - Drakirus/go-flutter-desktop-embedder: A Go (golang) Custom Flutter Engi...
source link: https://github.com/Drakirus/go-flutter-desktop-embedder
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Go Flutter desktop embedder
A Go (golang) Custom Flutter Engine Embedder for desktop
Purpose
This project doesn't compete with this awesome one. The purpose of this project is to support the Flutter framework on Windows, macOS, and Linux using a SINGLE code base.
GLFW fits the job because it provides the right abstractions over the OpenGL's Buffer/mouse/keyboard for each platform.
The choice of Golang comes from the fact that it
has the same tooling on every platform.
Plus golang is a great language because it keeps everything simple and readable,
which, I hope, will encourage people to contribute ?.
How to install
?? LinuxFrom binaries
Check out the Release page for prebuilt versions.From source
Go read first: go-gl/glfw
# Clone git clone https://github.com/Drakirus/Go-Flutter-desktop-embedder.git cd Go-Flutter-desktop-embedder # Download the share library wget https://storage.googleapis.com/flutter_infra/flutter/1ed25ca7b7e3e3e8047df050bba4174074c9b336/linux-x64/linux-x64-embedder \ -O temp.zip; unzip temp.zip; # Move the share library mv libflutter_engine.so ./flutter/library/linux/ # Clean-up rm flutter_embedder.h; rm temp.zip # build the Embedder go get -u github.com/go-gl/glfw/v3.2/glfw go build # build the flutter project cd flutter_project/stocks/ flutter build bundle cd ../.. # Play ./Go-Flutter-desktop-embedder
Flutter Demo Project
The example project is available here (from the official flutter repo)
Support
- Linux ?
- Windows ?
- MacOS ?
- Text input
- Plugins
- Clipboard (through shortcuts)
- Clipboard (through the click)
- Keyboard shortcuts
- ctrl-c ctrl-v ctrl-x ctrl-a
- Home End shift-Home shift-End
- Left ctrl-Left ctrl-shift-Left
- Right ctrl-Right ctrl-shift-Right
- Backspace ctrl-Backspace Delete
- ctrl-Delete
- Key events
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK