open method

Future<void> open({
  1. String? appStoreId,
  2. String? androidAppBundleId,
})

Implementation

Future<void> open({
  String? appStoreId,
  String? androidAppBundleId,
}) async {
  assert(
    appStoreId != null || androidAppBundleId != null,
    'You must pass one of this parameters',
  );

  if (kIsWeb) {
    throw PlatformException(code: 'Platform not supported');
  }

  if (PlatformUtils.isIOS) {
    await _openIos(appStoreId);
  } else if (PlatformUtils.isAndroid) {
    await _openAndroid(androidAppBundleId);
  } else {
    throw PlatformException(code: 'Platform not supported');
  }
}