Skip to content

Commit

Permalink
Restore call to preventDefaul on payment request button
Browse files Browse the repository at this point in the history
*
  • Loading branch information
cornwe19 committed Sep 5, 2024
1 parent c22a92f commit 86bd65b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/stripe_web/lib/src/widgets/platform_pay_button.dart
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -76,7 +74,7 @@ class _WebPlatformPayButtonState extends State<WebPlatformPayButton> {
height: '${constraints.maxHeight}px',
))))
..on('click', (event) {
//callMethod(event, 'preventDefault', []);
event.toDart['preventDefault']();
widget.onPressed();
})
..mount('#platform-pay-button'.toJS);
Expand Down

0 comments on commit 86bd65b

Please sign in to comment.