Skip to content

Commit

Permalink
fixed example
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Oct 13, 2022
1 parent 083d1ff commit 476dc86
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions example/lib/in_app_webiew_example.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
key: webViewKey,
// contextMenu: contextMenu,
initialUrlRequest:
URLRequest(url: Uri.parse("https://flutter.dev/")),
URLRequest(url: Uri.parse("https://github.com/flutter")),
// initialFile: "assets/index.html",
initialUserScripts: UnmodifiableListView<UserScript>([]),
initialOptions: options,
Expand Down Expand Up @@ -169,26 +169,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
this.url = url.toString();
urlController.text = this.url;
});

CookieManager cookieManager = CookieManager.instance();

await cookieManager.setCookie(
url: url!, name: "myCookie", value: "myValue");
List<Cookie> cookies = await cookieManager.getCookies(url: url);
print(cookies);

Cookie? cookie =
await cookieManager.getCookie(url: url, name: "myCookie");
print(cookie);

await cookieManager.deleteCookie(url: url, name: "myCookie", domain: ".flutter.dev");
cookie = await cookieManager.getCookie(url: url, name: "myCookie");
print(cookie);

await cookieManager.deleteCookies(url: url, domain: ".flutter.dev");
await Future.delayed(Duration(seconds: 1));
cookies = await cookieManager.getCookies(url: url);
print(cookies);
},
onLoadError: (controller, url, code, message) {
pullToRefreshController.endRefreshing();
Expand Down

0 comments on commit 476dc86

Please sign in to comment.