AdBlockerWebview constructor

const AdBlockerWebview({
  1. required AdBlockerWebviewController adBlockerWebviewController,
  2. required bool shouldBlockAds,
  3. Uri? url,
  4. String? initialHtmlData,
  5. void onLoadStart(
    1. String? url
    )?,
  6. void onLoadFinished(
    1. String? url
    )?,
  7. void onProgress(
    1. int progress
    )?,
  8. void onLoadError(
    1. String? url,
    2. int code
    )?,
  9. void onUrlChanged(
    1. String? url
    )?,
  10. Key? key,
})

Implementation

const AdBlockerWebview({
  required this.adBlockerWebviewController,
  required this.shouldBlockAds,
  this.url,
  this.initialHtmlData,
  this.onLoadStart,
  this.onLoadFinished,
  this.onProgress,
  this.onLoadError,
  this.onUrlChanged,
  super.key,
}) : assert(
       url != null || initialHtmlData != null,
       'Either url or initialHtmlData must be provided',
     ),
     assert(
       !(url != null && initialHtmlData != null),
       'Cannot provide both url and initialHtmlData',
     );