openAppStoreV2 method

Future<void> openAppStoreV2()

Implementation

Future<void> openAppStoreV2() async {
  if (_appStoreListingURL == null || _appStoreListingURL!.isEmpty) {
    return;
  }

  final uri = Uri.parse(_appStoreListingURL!);
  if (Platform.isAndroid) {
    await launchUrl(
      Uri.parse('market://details?${uri.query}'),
      mode: LaunchMode.externalApplication,
    );
  } else {
    if (await canLaunchUrl(Uri.parse(_appStoreListingURL!)) == true) {
      await launchUrl(
        Uri.parse(_appStoreListingURL!),
      );
    }
  }
}