1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter - Handling WebView back press in PopScope's onPopInvokedWithResult method

Discussão em 'Mobile' iniciado por Stack, Novembro 3, 2024 às 14:12.

  1. Stack

    Stack Membro Participativo

    I am using the following version of Flutter:

    Flutter 3.24.4
    Dart 3.5.4


    I am using the PopScope for WebView. How I can implement the WebView backpress in onPopInvokedWithResult method?

    I recently migrated from WillPopScope to PopScope and was using the onWillPop with the following function:

    Future<bool> goBack() async {
    if(await webViewController.canGoBack()){
    webViewController.goBack();
    return false;
    }
    return true;
    }

    Continue reading...

Compartilhe esta Página