Skip to content

Commit 1a0e4cb

Browse files
committed
Fix page callbacks for RawWebViewWidget.
1 parent 71b53a9 commit 1a0e4cb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/src/transformers/node_transformers/passive_web_view_transformer.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,11 @@ class _RawWebViewWidgetState extends State<RawWebViewWidget> {
207207

208208
_controller.setBackgroundColor(
209209
props.backgroundColor?.toFlutterColor() ?? Colors.transparent);
210-
211-
_controller.setNavigationDelegate(NavigationDelegate(
212-
onPageFinished: (url) => widget.onPageLoaded?.call(_controller, url),
213-
onPageStarted: (url) => widget.onPageStarted?.call(_controller, url),
214-
));
215210
}
211+
_controller.setNavigationDelegate(NavigationDelegate(
212+
onPageFinished: (url) => widget.onPageLoaded?.call(_controller, url),
213+
onPageStarted: (url) => widget.onPageStarted?.call(_controller, url),
214+
));
216215
}
217216

218217
Future<void> _loadData() {

0 commit comments

Comments
 (0)