Skip to content

[webview_flutter] Adds support to control whether to draw scrollbars #9024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Apr 8, 2025

Fixes flutter/flutter#62464
Updated version of #8174

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@bparrishMines bparrishMines added the federated: all_changes PR that contains changes for all packages for a federated plugin change label Apr 8, 2025
@bparrishMines bparrishMines changed the title Webview scrollbar [webview_flutter] Adds support to control whether to draw scrollbars Apr 8, 2025
@bparrishMines bparrishMines marked this pull request as ready for review April 8, 2025 03:44
@bparrishMines bparrishMines requested a review from cbracken as a code owner April 8, 2025 03:44
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

Looks good to split up with one addition; once that's added you can go ahead and split out the sub PRs.

/// Whether the horizontal scrollbar should be drawn or not.
Future<void> setHorizontalScrollBarEnabled(bool enabled) {
return platform.setHorizontalScrollBarEnabled(enabled);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also plumb through a Future<bool> supportsSetScrollBarsEnabled() method to the platform interface layer that clients can use to detect whether this is safe to call per https://github.com./flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#api-support-queries ? This won't make sense on all platforms, so we should expect that clients will need a support query indefinitely.

Copy link
Contributor Author

@bparrishMines bparrishMines Apr 21, 2025

Choose a reason for hiding this comment

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

I'm also assuming you meant for this to return bool and not Future<bool> too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
federated: all_changes PR that contains changes for all packages for a federated plugin change p: webview_flutter platform-android platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[webview_flutter]WebView can't hide scollbar
3 participants