updateByInfo static method
Future<Null>
updateByInfo({
- required UpdateEntity updateEntity,
- bool supportBackgroundUpdate = false,
- bool isAutoMode = false,
- String themeColor = '',
- String topImageRes = '',
- String buttonTextColor = '',
- double? widthRatio,
- double? heightRatio,
- bool overrideGlobalRetryStrategy = false,
- bool enableRetry = false,
- String retryContent = '',
- String retryUrl = '',
检查版本更新(Android Only)
Implementation
static Future<Null> updateByInfo(
{required UpdateEntity updateEntity,
///是否支持后台更新
bool supportBackgroundUpdate = false,
///是否开启自动模式
bool isAutoMode = false,
///应用弹窗的主题色
String themeColor = '',
///应用弹窗的顶部图片资源名
String topImageRes = '',
///按钮文字的颜色
String buttonTextColor = '',
///版本更新提示器宽度占屏幕的比例, 不设置的话不做约束
double? widthRatio,
///版本更新提示器高度占屏幕的比例, 不设置的话不做约束
double? heightRatio,
///是否覆盖全局的重试策略
bool overrideGlobalRetryStrategy = false,
///在下载过程中,如果点击了取消的话,是否弹出切换下载方式的重试提示弹窗
bool enableRetry = false,
///重试提示弹窗的提示内容
String retryContent = '',
///重试提示弹窗点击后跳转的url
String retryUrl = ''}) async {
assert(Platform.isAndroid);
final Map<String, Object?> map = {
'updateEntity': updateEntity.toMap(),
'supportBackgroundUpdate': supportBackgroundUpdate,
'isAutoMode': isAutoMode,
'themeColor': themeColor,
'topImageRes': topImageRes,
'buttonTextColor': buttonTextColor,
'widthRatio': widthRatio,
'heightRatio': heightRatio,
'overrideGlobalRetryStrategy': overrideGlobalRetryStrategy,
'enableRetry': enableRetry,
'retryContent': retryContent,
'retryUrl': retryUrl,
};
await _channel.invokeMethod('updateByInfo', map);
}