Since the mini program checks for updates and synchronizes versions upon opening, there may be a waiting period. To minimize the startup time and enhance the user experience, the following API is provided to pre-download the mini program packages.
appIdList: A list of mini program IDs to be loaded.
isDownload: If set to "true", the mini program package will be downloaded after preloading. The default value is "false".
Future<void> preDownloadMiniApp(List<String> appIdList,
{bool isDownload = false})
Sample code:
List<String> appIdList = ['app_id_1', 'app_id_2', 'app_id_3'];
_tcmppFlutterPlugin.preDownloadMiniApp(appIdList, isDownload: true);
Was this page helpful?