openAppStore static method

Future<String> openAppStore({
  1. String? fallbackUrl,
})

Open in AppStore

Implementation

static Future<String> openAppStore({String? fallbackUrl}) async {
  final appId = await getIosAppId() ?? '';

  if (appId.isNotEmpty) {
    launch('https://itunes.apple.com/app/id$appId');
    return 'Launched App Store';
  }

  if (fallbackUrl != null) {
    launch(fallbackUrl);
    return 'Launched App Store via $fallbackUrl';
  }

  return 'Not found in App Store';
}