checkForUpdates method

Future<bool> checkForUpdates(
  1. String storeURL
)

this method is for getting current app version and match it with store version pass play store URL or app store URL according to your Device URL Note: take app URL from browser android like that: https://play.google.com/store/apps/details?id=YOUR_ID iOs like that: https://apps.apple.com/eg/app/levc/idYOUR_ID

Implementation

Future<bool> checkForUpdates(String storeURL) async {
  final String? version = await _channel.invokeMethod('getCurrentVersion');
  final bool? isAvailable = await _isUpdateAvailable(storeURL, version!);
  return isAvailable!;
}