title: InAppWebView flutter shouldOverrideUrlLoading doesn't work when submit the form
body: <p>I am creating a flutter app, I have a page where I open the browser inside the app using InAppWebView. When navigating to other pages, I pass the header (to remove the footer in the mobile version of the site). But there is a page where the form is present. And when I click on the submit button, the page reloads, but the headers are no longer transmitted. How can I track this and transfer headers?</p>
  <pre><code>class _CreateTripScreenState extends State&lt;CreateTripScreen&gt; {
    InAppWebViewController webView;
    @override
    void initState() {
      super.initState();
    }
    @override
    void dispose() {
      super.dispose();
    }
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: new AppBar(
          leading: InkWell(
            child: Icon(
              Icons.arrow_back,
            ),
            onTap: () {
              Navigator.of(context).pushNamedAndRemoveUntil(
                  '/home',
                  ModalRoute.withName('/'));
            },
          ),
          centerTitle: false,
          title: new Text(&quot;....&quot;),
        ),
        body: InAppWebView(
          initialUrl: 'https://..../login-app?authkey=${globals.authkey}',
          initialHeaders: {'SB-app': 'android'},
          initialOptions: InAppWebViewGroupOptions(
            crossPlatform: InAppWebViewOptions(
              debuggingEnabled: true,
              useShouldOverrideUrlLoading: true,
              useShouldInterceptAjaxRequest: true,
            ),
            android: AndroidInAppWebViewOptions(
              domStorageEnabled: true,
              databaseEnabled: true,
            ),
          ),
          onWebViewCreated: (InAppWebViewController controller) {
            webView = controller;
          },
          onLoadStart: (InAppWebViewController controller, String url) {},
          onLoadStop: (InAppWebViewController controller, String url) async {},
          shouldOverrideUrlLoading: (InAppWebViewController controller, ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
            if (Platform.isAndroid || shouldOverrideUrlLoadingRequest.iosWKNavigationType == IOSWKNavigationType.LINK_ACTIVATED) {
              if (shouldOverrideUrlLoadingRequest.url.contains('/driver/') || shouldOverrideUrlLoadingRequest.url.contains('myauto') || shouldOverrideUrlLoadingRequest.url.contains('myautoform')) {
                await controller.loadUrl(url: shouldOverrideUrlLoadingRequest.url, headers: {
                  'SB-app': 'android'
                });
              };
              var urll = shouldOverrideUrlLoadingRequest.url;
              var uri = Uri.parse(urll);
              if (![&quot;http&quot;, &quot;https&quot;, &quot;file&quot;,
                &quot;chrome&quot;, &quot;data&quot;, &quot;javascript&quot;,
                &quot;about&quot;].contains(uri.scheme)) {
                print(urll);
                if (await canLaunch(urll)) {
                  await launch(
                    urll,
                  );
                  return ShouldOverrideUrlLoadingAction.CANCEL;
                }
              }
              return ShouldOverrideUrlLoadingAction.CANCEL;
            }
  
            return ShouldOverrideUrlLoadingAction.ALLOW;
          },
        ),
        bottomNavigationBar: BottomBar(),
      );
    }
  }
  </code></pre>