go-flutter 桌面端

最后更新于:2022-04-02 02:16:10

[TOC] ## 概述 go-flutter 就是把 flutter 代码支持 桌面端,即可在已有项目中支持桌面端 ## 安装 第一步: 安装 flutter [flutter 移动端](flutter%E7%A7%BB%E5%8A%A8%E7%AB%AF%E8%B7%A8%E5%B9%B3%E5%8F%B0.md) 第二步: 安装 hover ``` set GO111MODULE =off go get -u github.com/go-flutter-desktop/hover ``` ## 运行hello word ``` flutter create flutter_example_1 cd flutter_example_1 flutter pub get //如果已有移动端项目,进入项目后,此处执行 hover init demo1 hover run ``` ## 问题 ### Flutter requires Android SDK 28 and the Android BuildTools 28.0.3 ``` Android Studio -> SDK Manager -> SDK Platforms tab -> Select Android 9.0 Pie and press ok to download it Android Studio -> SDK Manager -> SDK Tools tab -> Select Show Package Details -> Under Android SDK Build-Tools section select 28.0.3 and press ok to download it //设置目录为上述安装所在目录 flutter config --android-sdk ```
';