feat(walletkit): Move to in-app browser approach for payments + fixes#350
Merged
ignaciosantise merged 7 commits intodevelopfrom Feb 13, 2026
Merged
feat(walletkit): Move to in-app browser approach for payments + fixes#350ignaciosantise merged 7 commits intodevelopfrom
ignaciosantise merged 7 commits intodevelopfrom
Conversation
- Change resizeToAvoidBottomInset to false and manually apply keyboard inset padding to content only, preventing layout jumps when switching fields - Add bottom padding based on keyboard height to ensure bottom form fields remain scrollable and reachable without full-scaffold resize - Remove step indicator pills from webview header for cleaner UI - Remove stepper parameter from WCPCollectDataWebView widget - Remove stepper state from payment details bottom sheet for consistency Fixes whitespace glitches when switching between form fields (DOB to Full Name) and glitchy behavior when opening Place of Birth country dropdown. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…port JS On iOS, use JS-based keyboard stabilization via the VisualViewport API instead of Flutter's resizeToAvoidBottomInset, which triggers WKWebView's double scroll adjustment bug (Flutter #45482, #98090). The injected script tracks keyboard inset, adds body padding so content scrolls above the keyboard, and keeps the focused input visible without jitter. On Android the default Flutter resize behavior is preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Opens payment data-collection form in SFSafariViewController (iOS) / Chrome Custom Tabs (Android) instead of embedded WebView to avoid WKWebView keyboard issues. Uses platform-specific callback strategies: - Android: custom URL scheme (wcflutterwallet://) via Chrome Custom Tabs - iOS: universal link redirect via SFSafariVC Includes test HTML form for local development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ssal When user closes the in-app browser without submitting the form, the AppLifecycleListener detects the app resumption and completes the completer with a cancellation error, preventing indefinite hangs and interceptor state leaks. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes keyboard handling issues in the WalletKit payment flow and simplifies the UI by removing step indicators. The main architectural change is the introduction of a browser-based data collection flow alongside the existing webview approach, with new lifecycle management to handle browser dismissals.
Changes:
- Updated native library dependencies (YttriumWrapper and related packages) to newer versions for iOS and Android
- Removed the payment flow start screen widget that displayed step indicators
- Added a new browser-based data collection implementation with deep link callback handling and AppLifecycleListener for browser dismissal detection
- Enhanced webview keyboard handling with iOS-specific JavaScript to manage keyboard insets and prevent layout glitches
- Removed step indicator (stepper) parameters from webview and bottom sheet components
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/walletconnect_pay/ios/walletconnect_pay.podspec | Updated YttriumWrapper dependency to 0.10.37 |
| packages/walletconnect_pay/android/build.gradle | Updated yttrium-wcpay dependency to 0.10.38 |
| packages/reown_yttrium_utils/ios/reown_yttrium_utils.podspec | Updated YttriumUtilsWrapper dependency to 0.10.37 |
| packages/reown_yttrium_utils/android/build.gradle | Updated yttrium-utils dependency to 0.10.38 |
| packages/reown_yttrium/ios/reown_yttrium.podspec | Updated YttriumWrapper dependency to 0.10.37 |
| packages/reown_yttrium/android/build.gradle | Updated yttrium dependency to 0.10.38 |
| packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_information_capture_start.dart | Removed entire file containing payment start screen with step indicators |
| packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_webview.dart | Added iOS keyboard handling JavaScript and removed stepper parameter; modified layout to use MediaQuery.removeViewInsets on iOS |
| packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_browser.dart | New file implementing in-app browser data collection with AppLifecycleListener for dismissal detection and deep link callback handling |
| packages/reown_walletkit/example/lib/walletconnect_pay/assets/test_form.html | New test HTML form for local testing of data collection flow |
| packages/reown_walletkit/example/lib/dependencies/walletkit_service.dart | Updated to use browser-based data collection by default; removed stepper logic from payment details display |
| packages/reown_walletkit/example/lib/dependencies/deep_link_handler.dart | Added one-shot interceptor mechanism to support browser callback handling |
| packages/reown_walletkit/example/ios/Podfile.lock | Updated iOS pod versions to match podspec changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ample/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_browser.dart
Show resolved
Hide resolved
...ample/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_browser.dart
Show resolved
Hide resolved
packages/reown_walletkit/example/lib/walletconnect_pay/assets/test_form.html
Outdated
Show resolved
Hide resolved
...ample/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_webview.dart
Outdated
Show resolved
Hide resolved
...ample/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_browser.dart
Show resolved
Hide resolved
- Take develop's AppSpacing/context.colors theming in wcp_collect_data_webview.dart - Keep deletion of wcp_information_capture_start.dart (removed step pills) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… only The in-app browser handles keyboard and layout natively, making the custom WebView with JS keyboard fixes unnecessary. Also removes the local test form that is no longer needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Missed reference in the "back" navigation path of _showPaymentDetails. Now uses _showCollectDataBrowser consistently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the data collection flow in the WalletKit example app, replacing the in-app WebView approach with an in-app browser flow for improved reliability and platform compatibility. The main changes include introducing a new browser-based data collection handler, updating the deep link handling logic to support one-shot interceptors, and removing the old WebView-based implementation.
Key changes:
Data Collection Flow Refactor
WCPCollectDataBrowser, which opens the data collection form in an in-app browser and listens for a callback deep link to determine completion. (wcp_collect_data_browser.dartadded,wcp_collect_data_webview.dartremoved) [1] [2]WalletKitServiceto use the new browser-based flow throughout the data collection process, removing all references to the previous WebView and related modals. (walletkit_service.dart) [1] [2] [3]Deep Link Handling
oneShotInterceptortoDeepLinkHandler, allowing temporary interception of a single deep link (used for browser callback handling), and updated the deep link processing logic to check this interceptor before normal processing. (deep_link_handler.dart) [1] [2]These changes streamline the user experience for data collection, improve cross-platform compatibility, and simplify the codebase by removing the need for complex WebView management.