From 86bd65b46e09b41e62dfd0539b9eeffadb90ba94 Mon Sep 17 00:00:00 2001 From: Dennis Cornwell Date: Thu, 5 Sep 2024 09:49:05 -0400 Subject: [PATCH] Restore call to preventDefaul on payment request button * --- .../stripe_web/lib/src/widgets/platform_pay_button.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/stripe_web/lib/src/widgets/platform_pay_button.dart b/packages/stripe_web/lib/src/widgets/platform_pay_button.dart index b169d64cd..fe811abeb 100644 --- a/packages/stripe_web/lib/src/widgets/platform_pay_button.dart +++ b/packages/stripe_web/lib/src/widgets/platform_pay_button.dart @@ -1,13 +1,11 @@ import 'dart:js_interop'; - -import 'package:web/web.dart' as web; import 'dart:ui' as ui; import 'package:flutter/material.dart'; import 'package:flutter_stripe_web/flutter_stripe_web.dart'; import 'package:flutter_stripe_web/src/parser/payment_request.dart'; - import 'package:stripe_js/stripe_js.dart'; +import 'package:web/web.dart' as web; const kPlatformPayButtonDefaultHeight = 40.0; @@ -76,7 +74,7 @@ class _WebPlatformPayButtonState extends State { height: '${constraints.maxHeight}px', )))) ..on('click', (event) { - //callMethod(event, 'preventDefault', []); + event.toDart['preventDefault'](); widget.onPressed(); }) ..mount('#platform-pay-button'.toJS);