mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit db01a953c2 - Show all commits

View File

@ -87,12 +87,12 @@ class DownloadApk {
// //
// await SystemNavigator.pop(); // 退APP // await SystemNavigator.pop(); // 退APP
var options = ['应用市场更新APP', '浏览器下载并安装APP']; var options = ['应用市场更新APP', '浏览器下载并安装APP'];
var uri = Uri.parse('market://details?id=com.example.marking_app'); // URI var uri = Uri.parse('market://details?id=${event.packageName}'); // URI
if (!await canLaunchUrl(uri)) options.removeAt(0); // if (!await canLaunchUrl(uri)) options.removeAt(0); //
String? option = await UpgradePermission.showCustomModalBottomSheet(context, options); String? option = await UpgradePermission.showCustomModalBottomSheet(context, options);
if (option == '应用市场更新APP') await launchUrl(uri); if (option == '应用市场更新APP') await launchUrl(uri);
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(event.link)); if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(event.link));
} catch (e) {} } catch (_) {}
}); });
print('安装执行完成了..............0.0'); print('安装执行完成了..............0.0');

View File

@ -77,14 +77,15 @@ class UpgradePermission {
// //
// await SystemNavigator.pop(); // 退APP // await SystemNavigator.pop(); // 退APP
var options = ['应用市场更新APP', '浏览器下载并安装APP']; var options = ['应用市场更新APP', '浏览器下载并安装APP'];
var uri = Uri.parse('market://details?id=com.example.marking_app'); // URI var uri = Uri.parse('market://details?id=${updateAppEvent.packageName}'); // URI
// if (!await canLaunchUrl(uri)) options.removeAt(0); // // if (!await canLaunchUrl(uri)) options.removeAt(0); //
String? option = await showCustomModalBottomSheet(context, options); String? option = await showCustomModalBottomSheet(context, options);
if (option == '应用市场更新APP') { if (option == '应用市场更新APP') {
if (await canLaunchUrl(uri)) if (await canLaunchUrl(uri)) {
await launchUrl(uri); await launchUrl(uri);
else } else {
await AppInstaller.goStore('com.example.marking_app', 'iOSAppId'); await AppInstaller.goStore(updateAppEvent.packageName, 'iOSAppId');
}
} }
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(updateAppEvent.link)); if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(updateAppEvent.link));
} else } else