ContentBlockerTrigger constructor
ContentBlockerTrigger({ - required String urlFilter,
- List<String> ifFrameUrl = const <String>[],
- bool urlFilterIsCaseSensitive = false,
- List<ContentBlockerTriggerResourceType> resourceType = const <ContentBlockerTriggerResourceType>[],
- List<String> ifDomain = const <String>[],
- List<String> unlessDomain = const <String>[],
- List<ContentBlockerTriggerLoadType> loadType = const <ContentBlockerTriggerLoadType>[],
- List<String> ifTopUrl = const <String>[],
- List<String> unlessTopUrl = const <String>[],
- List<ContentBlockerTriggerLoadContext> loadContext = const <ContentBlockerTriggerLoadContext>[],
})
Implementation
ContentBlockerTrigger({
required this.urlFilter,
this.ifFrameUrl = const <String>[],
this.urlFilterIsCaseSensitive = false,
this.resourceType = const <ContentBlockerTriggerResourceType>[],
this.ifDomain = const <String>[],
this.unlessDomain = const <String>[],
this.loadType = const <ContentBlockerTriggerLoadType>[],
this.ifTopUrl = const <String>[],
this.unlessTopUrl = const <String>[],
this.loadContext = const <ContentBlockerTriggerLoadContext>[],
}) {
assert(!(this.ifDomain.isEmpty || this.unlessDomain.isEmpty) == false);
assert(this.loadType.length <= 2);
assert(!(this.ifTopUrl.isEmpty || this.unlessTopUrl.isEmpty) == false);
}