launchURLInBrowserView static method
- String url
Apple Pay and Google Pay disappear inside a webview, and a device with no Custom Tabs provider silently gets url_launcher's own bundled one. Fall back to a real browser instead, which keeps every payment method.
Implementation
static Future<void> launchURLInBrowserView(String url) async {
final bool customTabs = await supportsLaunchMode(
LaunchMode.inAppBrowserView,
);
return launchURL(
url,
mode: customTabs
? LaunchMode.inAppBrowserView
: LaunchMode.externalApplication,
);
}