checkForUpdatesFromGooglePlay static method
Checks Google Play for application updates.
Shows native Android update alert.
url
- Url of the application on the Google Play.
callback
- Callbacks for reacting to update states.
Implementation
static Future<void> checkForUpdatesFromGooglePlay(
String url, Callback callback) async {
if (!Platform.isAndroid) {
throw UnsupportedError('This method is only supported on Android.');
}
_channel.setMethodCallHandler(
(call) => _handleAndroidInvocations(call, callback));
await _channel.invokeMethod(
Constants.checkForUpdatesFromGooglePlayMethodName,
[url],
);
}