NetworkPermission class

A permission that allows access to a network resource.

Implemented types

Constructors

NetworkPermission(Pattern matchPattern)
Create a new network permission that matches a Pattern.
const
NetworkPermission.url(String url)
Create a new network permission that matches a String URL. The URL can exclude the scheme, host, path, query, or fragment, in which case the permission will match any value for that part of the URL. If more customization is needed, use the default constructor to specify a RegExp Pattern directly.
factory

Properties

domains List<String>
The domain specifies the type of resource, such as 'network' or 'filesystem'.
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
matchPattern Pattern
The pattern that will be matched against the URL.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

match([Object? data]) bool
Returns true if the permission allows access to the specified resource. If the permission is granular, the data parameter may be used to specify a specific resource (e.g. a URL for a network permission).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

any NetworkPermission
A permission that allows access to any network resource.
final