AdblockFilterManager class
Manager class that handles multiple ad-blocking filters
Constructors
Properties
-
allowedDomains
→ Set<
String> -
Returns the list of allowed (whitelisted) domains
no setter
-
blockedDomains
→ Set<
String> -
Returns the list of blocked domains (custom block list)
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Returns whether the manager has been initialized
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statistics → BlockingStatistics
-
Returns the blocking statistics
no setter
Methods
-
addAllowedDomain(
String domain) → void - Adds a domain to the whitelist (allowed domains)
-
addBlockedDomain(
String domain) → void - Adds a domain to the custom block list
-
dispose(
) → Future< void> - Disposes all filters and releases resources
-
getAllResourceRules(
) → List< ResourceRule> - Gets all resource rules from all filters
-
getCSSRulesForWebsite(
String domain) → List< String> - Gets CSS rules for the given website
-
init(
FilterConfig config) → Future< void> - Initializes the filter manager with the given configuration
-
isAllowedDomain(
String urlOrDomain) → bool - Checks if a domain is in the whitelist
-
isBlockedDomain(
String urlOrDomain) → bool - Checks if a domain is in the custom block list
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAllowedDomain(
String domain) → bool - Removes a domain from the whitelist
-
removeBlockedDomain(
String domain) → bool - Removes a domain from the custom block list
-
resetStatistics(
) → void - Resets the blocking statistics
-
shouldBlockResource(
String url) → bool - Checks if a resource should be blocked
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited