Skip to content

[webview_flutter] Adds support to control overscrolling #8451

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

Merged
merged 23 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
34ddd2f
add scrollmode
bparrishMines Jan 9, 2025
1d3902a
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Jan 17, 2025
5bb0696
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Jan 31, 2025
4d3d081
add platform updates
bparrishMines Jan 31, 2025
01da228
fix docs
bparrishMines Feb 4, 2025
4e50d1b
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 7, 2025
acb1363
update mocks and add webview flutter test
bparrishMines Apr 7, 2025
6ba6cf5
export overscroll mode
bparrishMines Apr 7, 2025
0f923bd
undo web
bparrishMines Apr 7, 2025
d52fc36
android impl test
bparrishMines Apr 8, 2025
0d0df61
ios tests
bparrishMines Apr 8, 2025
63d7fdc
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 15, 2025
78ef3c7
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 16, 2025
b297998
add destroy back in
bparrishMines Apr 16, 2025
fadbd3e
add default behavior
bparrishMines Apr 16, 2025
5b45350
forgot value
bparrishMines Apr 16, 2025
1b18d6c
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 16, 2025
f89d0ab
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 17, 2025
e90b60a
version bump
bparrishMines Apr 17, 2025
c036f7d
fix changelog
bparrishMines Apr 17, 2025
ffc8dd4
pubspec changes
bparrishMines Apr 17, 2025
6a09a85
flutter version bump
bparrishMines Apr 17, 2025
ea6d045
Merge branch 'main' of github.com:flutter/packages into android_overs…
bparrishMines Apr 17, 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
5 changes: 3 additions & 2 deletions packages/webview_flutter/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 4.11.0

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
* Adds support to set the over-scroll mode for the WebView. See `WebViewController.setOverScrollMode`.
* Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.

## 4.10.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
webview_flutter_android: ^4.0.0
webview_flutter_wkwebview: ^3.13.0
webview_flutter_android: ^4.4.0
webview_flutter_wkwebview: ^3.19.0

dev_dependencies:
build_runner: ^2.1.5
Expand All @@ -27,7 +27,7 @@ dev_dependencies:
sdk: flutter
integration_test:
sdk: flutter
webview_flutter_platform_interface: ^2.10.0
webview_flutter_platform_interface: ^2.11.0

flutter:
uses-material-design: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,13 @@ class WebViewController {
) {
return platform.setOnScrollPositionChange(onScrollPositionChange);
}

/// Sets the over-scroll mode for the WebView.
///
/// Default behavior is platform dependent.
Future<void> setOverScrollMode(WebViewOverScrollMode mode) async {
return platform.setOverScrollMode(mode);
}
}

/// Permissions request when web content requests access to protected resources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export 'package:webview_flutter_platform_interface/webview_flutter_platform_inte
WebResourceResponse,
WebViewCookie,
WebViewCredential,
WebViewOverScrollMode,
WebViewPermissionResourceType,
WebViewPlatform;

Expand Down
12 changes: 6 additions & 6 deletions packages/webview_flutter/webview_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: webview_flutter
description: A Flutter plugin that provides a WebView widget backed by the system webview.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 4.10.0
version: 4.11.0

environment:
sdk: ^3.5.0
flutter: ">=3.24.0"
sdk: ^3.6.0
flutter: ">=3.27.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the minimum version for webview_flutter_android.


flutter:
plugin:
Expand All @@ -21,9 +21,9 @@ flutter:
dependencies:
flutter:
sdk: flutter
webview_flutter_android: ^4.0.0
webview_flutter_platform_interface: ^2.10.0
webview_flutter_wkwebview: ^3.15.0
webview_flutter_android: ^4.4.0
webview_flutter_platform_interface: ^2.11.0
webview_flutter_wkwebview: ^3.19.0

dev_dependencies:
build_runner: ^2.1.5
Expand Down
Loading