Google Pay button doesn't update the amount on Android
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
調査の方向性
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
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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google-pay/flutter-plugin のほかの issue
-
Unable to load asset: "packages/pay_platform_interface/pubspec.yaml".再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
google-pay/flutter-plugin#331 ·
-
Apple Pay Bottom Sheet – Incorrect Failure Design Handling After Backend Call Using Apple Pay Tokenオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
google-pay/flutter-plugin#322 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
google-pay/flutter-plugin#321 · コメント 2 件 · リアクション 9 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
google-pay/flutter-plugin#312 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
google-pay/flutter-plugin#311 · コメント 2 件 ·
google-pay/flutter-plugin の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jhomlala/betterplayer#1609 ·
メンテナーはふだん 1 日以内に返信
-
[FR] 缓存键放置在外面オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bggRGjQaUbCoE/PiliPlus#3310 ·
メンテナーはふだん 1 日以内に返信
-
package:code_builder type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[material_ui] CalendarDatePicker day numbers are cut off with large text scale on narrow screensオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信