adblock_detector
0.0.2, released 3 years ago by sethusenthil.com
Detects if a user has an ad blocker or DNS-level adblocking enabled.
What it does
Checks if the device has a DNS-level adblocker, AdGuard DNS, or specific ad networks blocked by making network requests. Verifies internet connectivity before checking to prevent false positives.
AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect if users are blocking ads or analytics endpoints via DNS blockers or extensions.
- You want to prompt users to whitelist your app or disable adblockers.
Skip it when
- Your target audience is in regions where certain ad networks or test domains are entirely blocked (e.g. China).
- You cannot tolerate false positives caused by temporary network drops.
Strengths
- Supports multiple built-in ad networks like Google AdMob and Media.net.
- Allows custom ad network URIs and custom test hosts for connectivity checks.
- Cross-platform support across mobile, web, and desktop.
Weaknesses
- Relies on network requests, which can fail or trigger false positives if connectivity fluctuates.
- Certain test networks or hosts may be blocked in specific countries like China.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
No complex native setup required. Uses standard HTTP requests.
AdBlockDetector adBlockDetector = AdBlockDetector();
bool isAdblocking = await adBlockDetector.isAdBlockEnabled(testAdNetworks: [AdNetworks.googleAdMob]);Alternatives
Packages that do the same job and could replace adblock_detector.
- flutter_tamper_detector
Detect rooting, hooking tools, emulators, debug mode and store installation on Android/iOS.
67Compare - device_calendar
Flutter plugin to read, create, update, and delete calendars and events on Android and iOS devices.
50Compare - screen_lock_detector
Detect screen lock and unlock events across Android and iOS platforms.
56Compare - flutter_activity_recognition
Recognize user activity on Android and iOS platforms.
50Compare