如何将flutter桌面应用发布到windows store

问题描述

如何使用 Flutter 2.02 测试版在 windows 商店上传 Flutter 桌面应用程序。我的桌面应用程序在 2.02 版上运行良好。

创建的窗口构建
Flutter build windows

解决方法

首先,您需要一个付费开发者帐号: https://developer.microsoft.com/de-de/store/register/

您获得一个低于 20 美元的开发帐户。 (一次性购买)

然后您使用 Flutter for Windows 构建您的应用程序,在此步骤之后,您可以使用 xsix 包为 Windows 应用商店构建 xsix 文件。您可以在此处找到该软件包的文档:https://pub.dev/documentation/msix/latest/

将此包添加到 dev_dependencies:

dev_dependencies:
  flutter_test:
    sdk: flutter
  msix: ^2.1.1

“如果您将 msix 发布到 Windows 应用商店,则不需要对其进行签名,Windows 应用商店会为您完成。要为 Windows 应用商店生成 msix 文件,请使用 --store 标志或在您的 msix 配置部分中添加 store: true pubspec.yaml。

注意: 配置值publisher_display_name、identity_name、msix_version、publisher 必须有效,您可以在Windows 应用商店仪表板> 产品> 产品标识中找到这些值。

有关详细信息,请参阅本教程:如何将您的 MSIX 程序包发布到 Microsoft Store”

然后使用这些评论:

flutter clean
flutter build windows
flutter pub run msix:create --store

完成此步骤后,您将获得用于上传到 Windows 应用商店的 msix 文件。

,

这是在 Windows 应用商店发布的指南:here