我想编写一个应用程序,让我从应用程序注册并发送发布请求并获得对 inappwebview 的响应,就像下面的考试一样
InAppWebView(
initialUrl: widget.initUrls,
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
mediaPlaybackRequiresUserGesture: false,
debuggingEnabled: true,
),
),
onWebViewCreated: (InAppWebViewController c){
_controller = c;
if(staticEmail != null && staticPass != null) {
_controller.postUrl(url: "https://xxxxxxx.com/my-account", postData: utf8.encode(
"email=${staticEmail}&password=${staticPass}&wooc_user_phone=${staticShop}&wooc_user_name=${staticShop}&woocommerce-register-nonce=5d1b626841&_wp_http_referer=/my-account/®ister=Register") )
.whenComplete(() => {print("done")}).catchError((err){print("err : ${err}");
isloading = false;
});
}
},
);
它登录正常。
但是当我转到另一个链接或当我关闭应用程序并再次登录时,它要求我再次登录我只想保存不会让我每次都登录的 cookie 或会话 ID