adblocker_webview 0.1.4 copy "adblocker_webview: ^0.1.4" to clipboard
adblocker_webview: ^0.1.4 copied to clipboard

A webview for flutter with adblocking capability. It's currently based on Flutter InAppWebview Plugin.

  • A webview implementation of in Flutter that blocks most of the ads that appear inside of the webpages
  • Current implementation is based on official flutter_inappwebview packages. So, the features and limitation of that package is included

On iOS the WebView widget is backed by a WKWebView. On Android the WebView widget is backed by a WebView.

Android iOS
Support SDK 19+ or 20+ 11.0+

Getting started #

Add adblocker_webview_flutter as a dependency in your pubspec.yaml file.

Usage #

  1. Acquire an instance of AdBlockerWebviewController
  final _adBlockerWebviewController = AdBlockerWebviewController.instance;

It's better to warm up the controller before displaying the webview. It's possible to do that by

  @override
  void initState() {
    super.initState();
    _adBlockerWebviewController.initialize();
    /// ... Other code here.
  }
  1. Add the AdBlockerWebviewWidget in widget tree
        AdBlockerWebviewWidget(
            url: "Valid url Here",
            adBlockerWebviewController: widget.controller,
            onProgress: (progress) {
              setState(() {
                _progress = progress;
              });
            },
            shouldBlockAds: true,
            /// Other params if required
          );

Supported params of AdBlockerWebviewWidget are:

const AdBlockerWebviewWidget({
    super.key,
    required this.url,
    required this.adBlockerWebviewController,
    required this.shouldBlockAds,
    this.onLoadStart,
    this.onLoadFinished,
    this.onProgress,
    this.onLoadError,
    this.onTitleChanged,
    this.options,
});

Contribution #

Contributions are welcome 😄. Please file an issue here if you want to include additional feature or found a bug!

9
likes
140
pub points
72%
popularity

Publisher

verified publisherislamdidarmd.dev

A webview for flutter with adblocking capability. It's currently based on Flutter InAppWebview Plugin.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_inappwebview, get_it, http

More

Packages that depend on adblocker_webview