This commit is contained in:
Juan Gilsanz Polo
2024-02-24 13:57:04 +01:00
parent dbfbc44837
commit 47953a0232

View File

@@ -74,8 +74,12 @@ class WebView extends ConsumerWidget {
isInspectable: false, isInspectable: false,
), ),
onUpdateVisitedHistory: (controller, url, androidIsReload) { onUpdateVisitedHistory: (controller, url, androidIsReload) {
controller.canGoBack().then((value) => ref.read(webViewProvider.notifier).setCanGoBack(value)); controller.canGoBack().then(
controller.canGoForward().then((value) => ref.read(webViewProvider.notifier).setCanGoForward(value)); (value) => context.mounted ? ref.read(webViewProvider.notifier).setCanGoBack(value) : null,
);
controller.canGoForward().then(
(value) => context.mounted ? ref.read(webViewProvider.notifier).setCanGoForward(value) : null,
);
}, },
), ),
), ),