checkAccepted static method

void checkAccepted(
  1. BuildContext context, {
  2. CookieBanner? banner,
})

Call this if you want to check if the users allowed cookies and show a banner if not. Create your own CookieBanner banner by creating your own Banner Class which extends CookieBanner. The acceptedId of your own CookieBanner overwrites the acceptedCookiesId.

Implementation

static void checkAccepted(BuildContext context, {CookieBanner? banner}) {
  if (banner == null && !exists(acceptedCookiesId)) _PopUp.show(context);
  if (banner != null && !exists(banner.acceptedId))
    _PopUp.show(context, alternative: banner);
}