startCheckout method
Start the web checkout flow. Returns the checkout URL or null on
failure (or for web_to_web upgrades, which complete server-side
with no WebView). Errors are exposed via
OfferManagerState.checkoutErrorMessage on the state stream.
Implementation
Future<Uri?> startCheckout({String? stripeCustomerId}) async {
_ensureNotDisposed();
final result =
await _methodChannel.invokeMethod<String?>('startCheckout', {
if (stripeCustomerId != null) 'stripeCustomerId': stripeCustomerId,
});
return result == null ? null : Uri.parse(result);
}