NetworkAllowlist constructor

const NetworkAllowlist({
  1. required Set<String> hosts,
  2. Set<String> schemes = const {'https'},
})

Creates an allowlist permitting exactly hosts over schemes.

schemes defaults to {'https'}http must be opted in explicitly.

Implementation

// coverage:ignore-line const ctor artifact allow deny behavior pinned by allowlist tests
const NetworkAllowlist({required this.hosts, this.schemes = const {'https'}})
  : _allowAnyHost = false;