I am working on app where I need to show certificate in pdf format inside WebView from specific URL. I am using webview_flutter plugin for webview.
Please consider the below mentioned code:
WebView(
debuggingEnabled: true,
initialUrl: Uri.encodeFull('https://docs.google.com/gview?embedded=true&url=${strUrl}'),
javascriptMode: JavascriptMode.unrestricted,
onProgress: (int progress) {
print('WebView is loading (progress : $progress%)');
},
onWebViewCreated: (webViewController) {
_controller.complete(webViewController);
webViewController.clearCache();
final cookieManager = CookieManager();
cookieManager.clearCookies();
},
),
Now on the progress log if the webview loads certificate properly then the progress shows like 10, 15, 30, 50, 80, 100. But in the case of white screen on no data loading progress went like 10, to directly 100. Logs are not working properly.
I couldn't use other libs or plugin, Is there any solution for same?