update_manager_ohos 0.0.1 update_manager_ohos: ^0.0.1 copied to clipboard
Provide version check and upgrade functionality for Flutter on HarmonyOS.
update_manager_ohos #
Provide version check and upgrade functionality for Flutter on HarmonyOS.
提供 Flutter HarmonyOS 平台上的版本检查和升级功能
安装 / Installation #
dependencies:
update_manager_ohos: ^0.0.1
使用 / Usage #
final hasUpdate = await UpdateManagerOhos.instance.checkUpdate();
debugPrint('hasUpdate: $hasUpdate');
/// 如果有可用的更新,弹出升级弹窗
if (hasUpdate) {
final didShowDialog = await UpdateManagerOhos.instance.showUpdateDialog();
debugPrint('didShowDialog: $didShowDialog');
}
官方文档 #
More information can be found in the official updateManager
详情请参考官方 API 文档: updateManager