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
+
1
5
## 2.7.0
2
6
3
7
* 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 {
286
286
'setOnConsoleMessage is not implemented on the current platform' ,
287
287
);
288
288
}
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
+ }
289
297
}
290
298
291
299
/// 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';
16
16
export 'platform_webview_cookie_manager_creation_params.dart' ;
17
17
export 'platform_webview_permission_request.dart' ;
18
18
export 'platform_webview_widget_creation_params.dart' ;
19
+ export 'scroll_position_change.dart' ;
19
20
export 'url_change.dart' ;
20
21
export 'web_resource_error.dart' ;
21
22
export '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
4
4
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22
5
5
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
6
6
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7
- version : 2.7 .0
7
+ version : 2.8 .0
8
8
9
9
environment :
10
10
sdk : " >=3.0.0 <4.0.0"
You can’t perform that action at this time.
0 commit comments