open method

  1. @override
Future<bool> open(
  1. Uri checkoutUrl
)
override

Opens checkoutUrl, leaving this app.

Returns false when the platform refused to open it at all, which is the one outcome distinguishable from "the player is now on the provider's page"; everything after that is only knowable from the return URL.

Implementation

@override
Future<bool> open(Uri checkoutUrl) => launchUrl(
  checkoutUrl,
  mode: LaunchMode.externalApplication,
  // Replace rather than open a tab: a popup is blocked unless the gesture is
  // recognized as one, and a checkout that silently fails to open is worse
  // than one that takes the page.
  webOnlyWindowName: '_self',
);