Skip to content

crazecoder/pgyer_updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgyer_updater

package

flutter蒲公英应用更新插件,使用api实现,理论上无平台限制,仅弹窗提醒,下载安装可拿到versionResult自行实现

Example

import 'package:package_info_plus/package_info_plus.dart';

final packageInfo = await PackageInfo.fromPlatform();
final projectVersionName = packageInfo.version;
PgyerUpdater.check(apiKey: "apiKey", appKey: "appKey", versionName: projectVersionName).then((result) {
  if (mounted) {
    PgyerUpdater.showUpdateDialog(
      context,
      versionResult: result,
      onConfirm: (appUrl) {
        //launchUrlString(appUrl);
        // 或者自行实现下载
        //final downloadUrl = PgyerUpdater.getDownloadUrl(result);
        //download(downloadUrl);
      },
    );
  }
});

About

使用api实现的蒲公英flutter应用更新插件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published