TinyUpgrader class

Flutter 应用内更新核心类 (采用单例模式)

Constructors

TinyUpgrader()
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
progressNotifier → ValueNotifier<double>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusNotifier → ValueNotifier<DownloadStatus>
final

Methods

check(BuildContext context, {required String url, UpdateAvailableCallback? onUpdateAvailable, Map<String, dynamic>? params}) → Future<void>
检查更新
getPlatformVersion() → Future<String?>
install() → Future<void>
调用平台接口安装APK (仅限Android)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseDownload() → void
暂停下载
startDownload() → Future<void>
开始或继续下载
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → TinyUpgrader
no setter

Static Methods

init({bool isDebug = false, String? baseUrl, Dio? dio, UpdateApiParser? parser, ErrorHandler? errorHandler, UpdateAvailableCallback? onUpdateAvailable, UpdateDialogBuilder? dialogBuilder}) → void
初始化配置 可以在 App 启动时调用此方法进行全局配置