Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2d07746
Add wrapper for androidx.webkit.WebSettingsCompat
mataku Jul 26, 2025
1a01f13
Add wrapper for androidx.webkit.WebViewFeature
mataku Jul 26, 2025
d098b47
Expose wrappers
mataku Jul 26, 2025
8fa5fe1
Add native unit tests for payment request feature
mataku Jul 26, 2025
381ae6f
Add sample menu for payment request
mataku Jul 26, 2025
5eee7b3
Prepare CHANGELOG
mataku Jul 26, 2025
d43bde1
Run auto-formatter
mataku Jul 26, 2025
a20f0fb
Simplify method description
mataku Jul 26, 2025
103e29f
Specify details with added methods
mataku Jul 26, 2025
8c73517
Fix RequiresFeature lint: setPaymentRequestEnabled should only be cal…
mataku Jul 26, 2025
5ed43ab
Fix format
mataku Jul 26, 2025
28f8889
Fix doc comments to correspond to the method
mataku Aug 1, 2025
3f68c0e
Remove sample for WebSettingsCompat and WebViewFeature.
mataku Aug 1, 2025
878fd38
Update generated files according to comment update
mataku Aug 1, 2025
b0388bc
Specify collect type
mataku Aug 2, 2025
5f7f689
Merge main into feature/expose-payment-request-enabled
mataku Aug 2, 2025
ddea6d4
Client should use setPaymentRequestEnabled if only WebViewFeatureProx…
mataku Aug 8, 2025
2b06e3d
Add Payment Request section for webview_flutter_android
mataku Aug 8, 2025
69c8a3e
Merge branch upstream/main into feature/expose-payment-request-enabled
mataku Aug 8, 2025
7337199
Fix tests according to SuppressLint
mataku Aug 8, 2025
47b6b6f
Address code-excerpt
mataku Aug 8, 2025
1cb2a20
Run update-excerpts
mataku Aug 8, 2025
5575248
Minor README wording changes
stuartmorgan-g Aug 14, 2025
8ab4499
Merge remote-tracking branch 'remotes/upstream/main' into feature/exp…
mataku Aug 15, 2025
74e8aa4
Create readme_excerpts.dart for snippets in README
mataku Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove sample for WebSettingsCompat and WebViewFeature.
method doc is enough
  • Loading branch information
mataku committed Aug 1, 2025
commit 3f68c0e88284a78de1e8beefb28ab4d54a47849c
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think we need to update the example app, because there is nothing to print or display to verify it is actually working. This just checks that the method is called, but this is already covered by unit tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. removed in 3f68c0e

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was re-added in 47b6b6f. Code that we want to show in the README but don't want to be in the example app should go in an example/lib/readme_excerpts.dart.

Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ enum MenuOptions {
basicAuthentication,
javaScriptAlert,
viewportMeta,
checkWebViewPaymentRequestFeatureEnabled,
}

class SampleMenu extends StatelessWidget {
Expand Down Expand Up @@ -408,8 +407,6 @@ class SampleMenu extends StatelessWidget {
_onJavaScriptAlertExample(context);
case MenuOptions.viewportMeta:
_onViewportMetaExample();
case MenuOptions.checkWebViewPaymentRequestFeatureEnabled:
_onWebViewFeatureExample(context);
}
},
itemBuilder: (BuildContext context) => <PopupMenuItem<MenuOptions>>[
Expand Down Expand Up @@ -486,10 +483,6 @@ class SampleMenu extends StatelessWidget {
value: MenuOptions.viewportMeta,
child: Text('Viewport meta example'),
),
const PopupMenuItem<MenuOptions>(
value: MenuOptions.checkWebViewPaymentRequestFeatureEnabled,
child: Text('WebView Feature Example'),
),
],
);
}
Expand Down Expand Up @@ -790,24 +783,6 @@ class SampleMenu extends StatelessWidget {
Future<void> _onViewportMetaExample() {
return webViewController.loadHtmlString(kViewportMetaPage);
}

Future<void> _onWebViewFeatureExample(BuildContext context) async {
final AndroidWebViewController androidController =
webViewController as AndroidWebViewController;
final bool paymentRequestEnabled = await androidController
.isWebViewFeatureSupported(WebViewFeatureType.paymentRequest);

// Call this method to enable the Payment Request API.
// if (paymentRequestEnabled) {
// await androidController.setPaymentRequestEnabled(true);
// }

if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text('Payment Request API supported: $paymentRequestEnabled'),
));
}
}
}

class NavigationControls extends StatelessWidget {
Expand Down