google-pay / google-pay/flutter-plugin

Check for Google Pay availability after bringing the application back to the foreground

Open
#9 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Dart
Stars
176
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Before displaying the Google Pay button, a readiness call is issued to determine whether the user in question can use Google Pay. Most of the times this value does not change. In some situations, the user may leave the app to configure Google Pay and come back once ready, and expect the button to show this time.

Observe on the WidgetsBindingObserver class to issue the readiness Future again when the user brings the app back to the foreground (on resumed)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to WidgetsBindingObserver and AppLifecycleState.resumed; start by locating the widget that displays the Google Pay button and its readiness Future. Re-run the readiness check when the app resumes, then verify that the button reflects the returned availability.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile, payments
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.