Debian上Flutter应用的部署流程
一 准备环境
二 启用Linux桌面支持并构建
三 打包为Debian安装包 .deb
四 在目标机器安装与启动
sudo tee /etc/systemd/system/my_flutter_app.service >/dev/null <<‘EOF’ [Unit] Description=My Flutter App After=network.target
[Service] ExecStart=/opt/my_flutter_app/my_flutter_app Restart=always User=myuser Environment=DISPLAY=:0
[Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload
sudo systemctl enable --now my_flutter_app。
五 可选方案