loadStripe function

Future<void> loadStripe()

document when Stripe is initialized.

Implementation

Future<void> loadStripe() async {
  // If Stripe is already available, Stripe has already been initialized
  // (or the user has added the scripts to their html file).
  if (context['Stripe'] != null) {
    return;
  }

  return _injectSrcScript(
    'https://js.stripe.com/v3/',
    'stripe_${_version}',
  );
}