flutter 写后台系统,运行到windows

5,280 阅读1分钟

flutter 写后台系统,运行到windows

1.老规矩,先上图

动画.gif

2.如何配置windows开发环境

1.sdk升级到最新 :flutter upgrade

2.配置windows开发:flutter config --enable-windows-desktop

3.安装VisualStudio ,选择c++开发版

3.开发总结与坑

1.采用getx框架,用起来感觉很方便

2.去掉不必要的expand 运行到windows会出错,web端正常

3.屏幕适配可以用desktop_window这个插件

4.打包安装程序用msix 2.1.1这个插件,

普通release包,在自己电脑上可以运行,但其他人电脑安装为超dll文件

windows打包  1.flutter build windows  2.flutter pub run msix:create

image-20210518175741764.png

这个插件打包后msix文件,再用advanced installer生成exe

5.windows和web端同一套代码

4.项目结构

image-20210518180941331.png