File tree Expand file tree Collapse file tree 5 files changed +31
-1
lines changed
packages/webview_flutter/webview_flutter_platform_interface Expand file tree Collapse file tree 5 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 2.8.0
2+
3+ * Adds support to track scroll position changes. See ` PlatformWebViewController.setOnScrollPositionChange ` .
4+
15## 2.7.0
26
37* Adds support for handling HTTP basic authentication requests. See ` PlatformNavigationDelegate.setOnHttpAuthRequest ` .
Original file line number Diff line number Diff line change @@ -286,6 +286,14 @@ abstract class PlatformWebViewController extends PlatformInterface {
286286 'setOnConsoleMessage is not implemented on the current platform' ,
287287 );
288288 }
289+
290+ /// Sets the listener for content offset changes.
291+ Future <void > setOnScrollPositionChange (
292+ void Function (ScrollPositionChange scrollPositionChange)?
293+ onScrollPositionChange) {
294+ throw UnimplementedError (
295+ 'setOnScrollPositionChange is not implemented on the current platform' );
296+ }
289297}
290298
291299/// Describes the parameters necessary for registering a JavaScript channel.
Original file line number Diff line number Diff line change 1+ // Copyright 2013 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ /// Defines the parameters of the scroll position change callback.
6+ class ScrollPositionChange {
7+ /// Creates a [ScrollPositionChange] .
8+ const ScrollPositionChange (this .x, this .y);
9+
10+ /// The value of the horizontal offset with the origin being at the leftmost
11+ /// of the `WebView` .
12+ final double x;
13+
14+ /// The value of the vertical offset with the origin being at the topmost of
15+ /// the `WebView` .
16+ final double y;
17+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export 'platform_webview_controller_creation_params.dart';
1616export 'platform_webview_cookie_manager_creation_params.dart' ;
1717export 'platform_webview_permission_request.dart' ;
1818export 'platform_webview_widget_creation_params.dart' ;
19+ export 'scroll_position_change.dart' ;
1920export 'url_change.dart' ;
2021export 'web_resource_error.dart' ;
2122export 'webview_cookie.dart' ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/webview_flutt
44issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22
55# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7- version : 2.7 .0
7+ version : 2.8 .0
88
99environment :
1010 sdk : " >=3.0.0 <4.0.0"
You can’t perform that action at this time.
0 commit comments