fixed code example

This commit is contained in:
Lorenzo Pichilli 2022-04-25 18:00:10 +02:00
parent c48c1814a4
commit f885a0537f
1 changed files with 0 additions and 14 deletions

View File

@ -169,20 +169,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
this.url = url.toString();
urlController.text = this.url;
});
if (url?.host == 'github.com') {
await controller.loadUrl(
urlRequest: URLRequest(
url: Uri.parse('https://flutter-header-echo.herokuapp.com/'),
headers: {
'test_header': 'flutter_test_header'
}));
final String? currentUrl = (await controller.getUrl())?.toString();
print(currentUrl);
await Future.delayed(Duration(seconds: 2));
final String? content = await controller.evaluateJavascript(
source: 'document.documentElement.innerText');
print(content);
}
},
onLoadError: (controller, url, code, message) {
pullToRefreshController.endRefreshing();