Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Google Pay button doesn't update the amount on Android

オープン
#323 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, dart, flutter
領域
mobile, payments

調査の方向性

GooglePayButton から始め、Android プラットフォームビューがウィジェットの再ビルドをまたいで支払い金額とアイテムをどのように受け取るかを追跡します。チェックアウト合計が変化する状態で問題を再現します。状態駆動の再ビルド後に、ウィジェットをツリーから削除することなく、Google Pay シートに最新の支払い金額とアイテムが表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Issue description

GooglePayButton does not update when the payment amount or payment items change after the widget has been built.

Even if the widget rebuilds due to state updates (setState, Bloc, Provider, etc.), the button continues using the initial amount configuration. The updated payment data is not reflected when the Google Pay sheet opens.

The only workaround is to completely remove the widget from the tree and add it again. This suggests the underlying platform view is initialized once and not reconfigured on rebuild. This makes the widget hard to use in dynamic checkout flows where totals change (shipping, discounts, taxes, quantity updates, etc.).

Expected behavior

After a state change and widget rebuild, the Google Pay sheet should display the latest payment amount and items, not the original values.

Reference

paymentItems is not reactive

Flutter doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.7, on macOS 15.1 24B83 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
✗ cmdline-tools component is missing.
Try installing or updating Android Studio.
Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.2)
[✓] VS Code (version 1.98.2)
[✓] Connected device (3 available)
[✓] Network resources

Recording
主要言語
Dart
スター
177
フォーク
145
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google-pay/flutter-plugin のほかの issue

google-pay/flutter-plugin の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。