Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2.0.0] Google Pay button ignores provided height #256

Open
kamil-matula opened this issue Apr 24, 2024 · 0 comments
Open

[v2.0.0] Google Pay button ignores provided height #256

kamil-matula opened this issue Apr 24, 2024 · 0 comments

Comments

@kamil-matula
Copy link

Hey, guys! I have recently upgraded library from v1.1.2 to v2.0.0 (pay_android: 2.0.0, pay_ios: 1.0.11 and pay_platform_interface: 1.0.4, according to my pubspec.lock file) and spotted that height of Google Pay button is not the same as it was. After small investigation it turned out that, although I'm setting property's value to 120, its value is still equal to defaultButtonHeight, which is 48, and additional 120-48=72 are added below the button. What's weird, Apple Pay button is not affected by this issue:

Here's part of my code:

import 'package:pay/pay.dart' as pay;
...
return methodType == PaymentTypes.google
    ? pay.GooglePayButton(
        width: double.infinity,
        height: 120,
        cornerRadius: 15,
        type: pay.GooglePayButtonType.pay,
        theme: pay.GooglePayButtonTheme.light,
        paymentConfiguration: gPayConfiguration,
        paymentItems: [paymentItem],
        onPaymentResult: _onPayClick,
        loadingIndicator: _indicatorButton(),
        childOnError: _errorButton('Google Pay'),
        onError: _onError,
      )
    : pay.ApplePayButton(
        width: double.infinity,
        height: 120,
        cornerRadius: 15,
        style: pay.ApplePayButtonStyle.white,
        paymentConfiguration: aPayConfiguration,
        paymentItems: [paymentItem],
        onPaymentResult: _onPayClick,
        loadingIndicator: _indicatorButton(),
        childOnError: _errorButton('Apple Pay'),
        onError: _onError,
      );

I haven't found any issues in library's code yet. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant