openSubscriptionManagementPage method

Future<void> openSubscriptionManagementPage()

Implementation

Future<void> openSubscriptionManagementPage() async {
  // Construct the Android URL for the subscription management page.
  final androidUrl =
      Uri.parse('https://play.google.com/store/account/subscriptions');

  // Check if the URL can be launched.
  if (await canLaunchUrl(androidUrl)) {
    // Launch the URL.
    await launchUrl(androidUrl);
  } else {
    // Log an error if the URL cannot be launched.
    if (kDebugMode) {
      print("Unable to launch subscription management page.");
    }
  }
}