Flutter Windows应用demo
下载flutter sdk:
git clone -b master https://github.com/flutter/flutter.git
启用windows支持:
flutter config --enable-windows-desktop
set ENABLE_FLUTTER_DESKTOP=true
运行flutter doctor:
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel master, v1.18.0-6.0.pre.80, on Microsoft Windows [Version 10.0.18363.720], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including the following components: MSBuild MSVC v142 - VS 2019 C++ x64/x86 build tools - If there are multiple build tool versions available, install the latest Windows 10 SDK (10.0.17763.0) [√] Android Studio (version 3.6) [!] IntelliJ IDEA Ultimate Edition (version 2019.3) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. [√] Connected device (1 available)
可以看出来,需要下载Visual Studio:里面有提示下载的地址:https://visualstudio.microsoft.com/downloads/
然后安装 "Desktop development with C++" ,要注意的是: Windows 10 SDK (10.0.17763.0) ,需要下载的是10.0.17763.0这个版本的。因为默认下载的是其他版本的sdk,所以勾选的时候,需要注意选择。 MSBuild MSVC v142 - VS 2019 C++ x64/x86 build tools 这2个是默认就有选择的。
再次运行flutter doctor,就说明flutter支持windows应用就好了。
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel master, v1.18.0-6.0.pre.80, on Microsoft Windows [Version 10.0.18363.720], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.5.4) [√] Android Studio (version 3.6) [!] IntelliJ IDEA Ultimate Edition (version 2019.3) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. [√] Connected device (1 available)
下载windows应用demo:
git clone https://github.com/google/flutter-desktop-embedding
运行Flutter windows应用的demo:
D:\Development\Workspace\Flutter\Windows\flutter-desktop-embedding\testbed>D:\Development\FlutterSDK\flutter_master\flutter\bin\flutter run
运行效果:
参考资料:
https://github.com/wintops/Atopas/blob/master/flutter_windows.md
https://zhuanlan.zhihu.com/p/91686888
分类:
Flutter
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 智能桌面机器人:用.NET IoT库控制舵机并多方法播放表情
· Linux glibc自带哈希表的用例及性能测试
· 深入理解 Mybatis 分库分表执行原理
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 新年开篇:在本地部署DeepSeek大模型实现联网增强的AI应用
· DeepSeek火爆全网,官网宕机?本地部署一个随便玩「LLM探索」
· Janus Pro:DeepSeek 开源革新,多模态 AI 的未来
· 互联网不景气了那就玩玩嵌入式吧,用纯.NET开发并制作一个智能桌面机器人(三):用.NET IoT库
· 上周热点回顾(1.20-1.26)