title: How to remove white screen in between flutter -release build
body: <p>I had a problem with flutter -release build. I had a splash screen and then after that It should show some progress loading bar before it loaded my webview. In debug my code work perfectly, but after I use it on release apk. It will show white screen in between instead and the progressbar is not shown but will directly go to my webview page instead. I already add internet.Permision into manifest, the problem only occur in release but not in debug.</p>
  <p>Here my code for reference:</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'dart:async';
  import 'package:connectivity/connectivity.dart';
  import 'package:flutter_inappwebview/flutter_inappwebview.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: InAppView(),
      );
    }
  }
  
  class InAppView extends StatefulWidget {
    @override
    State&lt;StatefulWidget&gt; createState() {
      // TODO: implement createState
      return _InAppViewState();
    }
  }
  
  class _InAppViewState extends State&lt;InAppView&gt; {
    @override
    initState() {
      super.initState();
      subscription = Connectivity()
          .onConnectivityChanged
          .listen((ConnectivityResult result) {
        if (result != ConnectivityResult.none &amp;&amp; webView != null) {
          _loadError = false;
          webView.reload();
        }
      });
    }
  
    num position = 1;
  
    final key = UniqueKey();
  
    doneLoading(String A) {
      setState(() {
        position = 0;
      });
    }
  
    startLoading(String A) {
      setState(() {
        position = 1;
      });
    }
  
    InAppWebViewController webView;
    int _page = 2;
    bool _loadError = false;
    StreamSubscription&lt;ConnectivityResult&gt; subscription;
  
    @override
    dispose() {
      super.dispose();
      subscription.cancel();
    }
  
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return Scaffold(
        body: IndexedStack(
          index: _page,
          children: &lt;Widget&gt;[
            Padding(
              padding: const EdgeInsets.only(top: 20.0),
              child: InAppWebView(
                initialUrl: &quot;https://flutter.dev/&quot;,
                initialHeaders: {
                  'Accept': 'application/json',
                },
                initialOptions: InAppWebViewGroupOptions(
                    crossPlatform: InAppWebViewOptions(
                  debuggingEnabled: true,
                )),
                onWebViewCreated: (InAppWebViewController controller) {
                  webView = controller;
                },
                onLoadStart: (InAppWebViewController controller, String url) {},
                onLoadStop: (InAppWebViewController controller, String url) {
                  setState(() {
                    if (!_loadError) {
                      _page = 0;
                    } else {
                      _page = 1;
                    }
                  });
                },
                onLoadError: (InAppWebViewController controller, String url,
                    int code, String message) async {
                  print(&quot;error $url: $code, $message&quot;);
                  _loadError = true;
                },
                onLoadHttpError: (InAppWebViewController controller, String url,
                    int statusCode, String description) async {
                  print(&quot;HTTP error $url: $statusCode, $description&quot;);
                },
              ),
            ),
            Container(
              child: Center(
                child: Text(&quot;Some error occured !!&quot;),
              ),
            ),
            Container(
              color: Colors.black,
              child: Center(child: CircularProgressIndicator()),
            ),
          ],
        ),
      );
    }
  }
  </code></pre>