simpleHtmlUriWhitelist top-level constant

OpaqueToken<List<Uri>> const simpleHtmlUriWhitelist

Injection token for the URI whitelist. This whitelist defines which URIs may be valid targets for links.

This is an optional dependency; if not provided, the component will use _defaultUriWhitelist instead, which should be sufficient for most cases.

If the list bound to this token includes a URI u, all URIs matching u's origin (i.e. schema, domain, and port) are permitted. If u includes a path then only URIs within that path are permitted; in this case, the path must end in a slash (otherwise https://dog.com/a/b would also allow https://dog.com/a/bad, which is almost certainly not intended). The same domain can be listed several times to whitelist multiple paths.

Implementation

const simpleHtmlUriWhitelist = OpaqueToken<List<Uri>>('simpleHtmlUriWhitelist');