adblocker_webview
2.3.0, released 11 months ago by didarul.codes
Flutter WebView implementation that blocks ads and trackers using filter lists.
What it does
Provides a WebView widget for Flutter with built-in ad and tracker blocking capabilities based on EasyList and AdGuard filter lists. Supports both URL and HTML content loading, navigation control, custom JavaScript injection, whitelisting, and statistics tracking.
AI-written summary of version 2.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display web content inside your Flutter application while blocking ads and trackers.
- You require domain-based filtering, custom user agents, and element hiding in a WebView.
- You want to track blocking statistics and manage whitelisted domains.
Skip it when
- You require a general-purpose webview without adblocking overhead.
- You need advanced desktop browser features not supported by the underlying mobile-focused webview plugins.
Strengths
- Supports EasyList and AdGuard filter lists for robust ad blocking.
- Provides singleton controller for dynamic domain whitelisting and statistics.
- Early resource blocking for better performance.
Weaknesses
- Relies on official Flutter WebView plugin which may have platform-specific limitations.
- Requires specific minimum Flutter and Dart versions.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Initialize the singleton controller with a FilterConfig in main() before running the app.
AdBlockerWebview(
url: Uri.parse('https://example.com'),
shouldBlockAds: true,
adBlockerWebviewController: AdBlockerWebviewController.instance,
)Alternatives
Packages that do the same job and could replace adblocker_webview.
- desktop_webview_window
Show a native webview window on your Flutter desktop application.
94Compare - webview_flutter_web
WebView widget implementation for Flutter web.
50Compare - webview_windows
A WebView2-powered webview implementation for the Windows platform.
50Compare - flutter_webview_plugin
Plugin that allows Flutter to communicate with a native WebView.
50Compare
Works with
Packages commonly used together with adblocker_webview: ones it builds on, ones built on it, and its own family.
- webview_flutter_wkwebviewadblocker_webview depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidadblocker_webview depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutteradblocker_webview depends on itFlutter plugin that embeds a native WebView widget.