ContentBlockerTrigger constructor

ContentBlockerTrigger({
  1. required String urlFilter,
  2. List<String> ifFrameUrl = const <String>[],
  3. bool urlFilterIsCaseSensitive = false,
  4. List<ContentBlockerTriggerResourceType> resourceType = const <ContentBlockerTriggerResourceType>[],
  5. List<String> ifDomain = const <String>[],
  6. List<String> unlessDomain = const <String>[],
  7. List<ContentBlockerTriggerLoadType> loadType = const <ContentBlockerTriggerLoadType>[],
  8. List<String> ifTopUrl = const <String>[],
  9. List<String> unlessTopUrl = const <String>[],
  10. 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);
}