setDeviceIdToWebview static method

Future<void> setDeviceIdToWebview(
  1. String domain
)

Implementation

static Future<void> setDeviceIdToWebview(String domain) async {
  WebViewCookieManager cookieManager = WebViewCookieManager();
  String advId = (await methodChannel.invokeMethod('getCookieId')) as String;
  // set the cookie
  await cookieManager.setCookie(
      WebViewCookie(name: "_vz", value: "viz_a_$advId", domain: domain));
}