@@ -28,6 +28,7 @@ class FlutterWebviewPlugin {
2828 final _onStateChanged = StreamController <WebViewStateChanged >.broadcast ();
2929 final _onScrollXChanged = StreamController <double >.broadcast ();
3030 final _onScrollYChanged = StreamController <double >.broadcast ();
31+ final _onProgressChanged = new StreamController <double >.broadcast ();
3132 final _onHttpError = StreamController <WebViewHttpError >.broadcast ();
3233
3334 Future <Null > _handleMessages (MethodCall call) async {
@@ -44,6 +45,9 @@ class FlutterWebviewPlugin {
4445 case 'onScrollYChanged' :
4546 _onScrollYChanged.add (call.arguments['yDirection' ]);
4647 break ;
48+ case "onProgressChanged" :
49+ _onProgressChanged.add (call.arguments["progress" ]);
50+ break ;
4751 case 'onState' :
4852 _onStateChanged.add (
4953 WebViewStateChanged .fromMap (
@@ -68,6 +72,9 @@ class FlutterWebviewPlugin {
6872 /// more detail than other events
6973 Stream <WebViewStateChanged > get onStateChanged => _onStateChanged.stream;
7074
75+ /// Listening web view loading progress estimation, value between 0.0 and 1.0
76+ Stream <double > get onProgressChanged => _onProgressChanged.stream;
77+
7178 /// Listening web view y position scroll change
7279 Stream <double > get onScrollYChanged => _onScrollYChanged.stream;
7380
@@ -194,6 +201,7 @@ class FlutterWebviewPlugin {
194201 _onDestroy.close ();
195202 _onUrlChanged.close ();
196203 _onStateChanged.close ();
204+ _onProgressChanged.close ();
197205 _onScrollXChanged.close ();
198206 _onScrollYChanged.close ();
199207 _onHttpError.close ();
0 commit comments