has_cookie method

Future<bool> has_cookie(
  1. String domain,
  2. String cookie
)

Implementation

Future<bool> has_cookie(String domain, String cookie) async {
  final cookie_func = (await (await page).cookies);
  final cookies = await cookie_func(urls: [domain]);
  return cookies.any((element) => element.name == cookie);
}