completeFlexibleUpdate static method

Future<PlayxVersionUpdateResult<bool>> completeFlexibleUpdate()

Install a flexible update. When you detect the PlayxDownloadStatus.downloaded state, you need to restart the app to install the update. Unlike with immediate updates, Google Play does not automatically trigger an app restart for a flexible update. This is because during a flexible update, the user has an expectation to continue interacting with the app until they decide that they want to install the update. It is recommended that you provide a notification (or some other UI indication) to inform the user that the update is ready to install and request confirmation before restarting the app. You can check if the app needs to be installed from : isFlexibleUpdateNeedToBeInstalled it's also recommended to use this method on App resume to check whether your app has an update waiting to be installed. If your app has an update in the DOWNLOADED state, prompt the user to install the update. Otherwise, the update data continues to occupy the user's device storage. When you call completeFlexibleUpdate in the foreground, the platform displays a full-screen UI that restarts the app in the background. After the platform installs the update, your app restarts into its main. If you instead call completeFlexibleUpdate when your app is in the background, the update is installed silently without obscuring the device UI.

Implementation

static Future<PlayxVersionUpdateResult<bool>> completeFlexibleUpdate() {
  return PlayxVersionUpdatePlatform.instance.completeFlexibleUpdate();
}