UriCachedWatcher class
create a CachedWatcher of type Uri, which reacts just like normal Uri, but with watcher capabilities.
- Inheritance
-
- Object
- ChangeNotifier
- Watcher<
Uri> - CachedWatcher<
Uri> - UriCachedWatcher
- Implemented types
- Available Extensions
Constructors
- UriCachedWatcher(Uri initialValue, String key)
Properties
-
The authority component.
no setteroverride
- cache → Future
-
no setterinherited
- data → UriData?
-
Access the structure of a
data:
URI.no setteroverride - fragment → String
-
The fragment identifier component.
no setteroverride
- hasAbsolutePath → bool
-
Whether the URI has an absolute path (starting with '/').
no setteroverride
- hasAuthority → bool
-
Whether the URI has an authority component.
no setteroverride
- hasEmptyPath → bool
-
Whether the URI has an empty path.
no setteroverride
- hasFragment → bool
-
Whether the URI has a fragment part.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- hasPort → bool
-
Whether the URI has an explicit port.
no setteroverride
- hasQuery → bool
-
Whether the URI has a query part.
no setteroverride
- hasScheme → bool
-
Whether the URI has a scheme component.
no setteroverride
- host → String
-
The host part of the authority component.
no setteroverride
- initialValue → Uri
-
finalinherited
- isAbsolute → bool
-
Whether the URI is absolute.
no setteroverride
- isCaching → bool
-
isCaching
no setterinherited
- isDisposed → bool
-
Flag which returns true if you called the dispose method.
It is useful when you want to safely do some operations on the Watcher without getting an exception if it gets disposed.
no setterinherited
- key ↔ String
-
key
latefinalinherited
- origin → String
-
Returns the origin of the URI in the form scheme://host:port for the
schemes http and https.
no setteroverride
- path → String
-
The path component.
no setteroverride
-
pathSegments
→ List<
String> -
The URI path split into its segments.
no setteroverride
- port → int
-
The port part of the authority component.
no setteroverride
- query → String
-
The query component.
no setteroverride
-
queryParameters
→ Map<
String, String> -
The URI query split into a map according to the rules
specified for FORM post in the HTML 4.01 specification section
17.13.4.
no setteroverride
-
queryParametersAll
→ Map<
String, List< String> > -
Returns the URI query split into a map according to the rules
specified for FORM post in the HTML 4.01 specification section
17.13.4.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeMode → bool
-
safeMode if enabled will not allow any setting of value or notifying any listeners if the Watcher isDisposed
finalinherited
- scheme → String
-
The scheme component of the URI.
no setteroverride
-
stream
→ Stream<
Uri> -
Converts the Watcher into a Stream. This stream emits values whenever the
value changes. The use of
distinct
ensures that consecutive duplicate values are filtered out, thus the stream only emits when the value actually changes.no setterinherited - userInfo → String
-
The user info part of the authority component.
no setteroverride
- v ↔ Uri
-
Equivalent to the getter value but in shorter syntax.
getter/setter pairinherited
- value ↔ Uri
-
The current value stored in this watcher.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
debounce(
Duration duration, void action(Uri value)) → VoidCallback -
Registers a debounced callback which is invoked only after the notifier's value
is stable for the specified
duration
.inherited -
deleteCache(
) → Future< void> -
deleteCache
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
isScheme(
String scheme) → bool -
Whether the scheme of this Uri is
scheme
.override -
normalizePath(
) → Uri -
Returns a URI where the path has been normalized.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onChange(
void action(Uri value)) → VoidCallback -
Registers a callback to be invoked whenever the
ValueNotifier
's value changes.inherited -
read(
dynamic data) → Uri? -
read
override
-
refresh(
) → void -
Rebuilds and trigger any listeners of any WatchValue or
watch
attached to that Watcher.inherited -
removeFragment(
) → Uri -
Creates a
Uri
that differs from this only in not having a fragment.override -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
replace(
{String? scheme, String? userInfo, String? host, int? port, String? path, Iterable< String> ? pathSegments, String? query, Map<String, dynamic> ? queryParameters, String? fragment, bool refresh = true}) → Uri -
Creates a new
Uri
based on this one, but with some parts replaced.override -
resolve(
String reference) → Uri -
Resolve
reference
as an URI relative tothis
.override -
resolveUri(
Uri reference) → Uri -
Resolve
reference
as a URI relative tothis
.override -
setWithoutNotify(
Uri newValue) → void -
inherited
-
startCaching(
) → void -
startCaching
inherited
-
stopCaching(
) → void -
stopCaching
inherited
-
toFilePath(
{bool? windows}) → String -
Creates a file path from a file URI.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateIf(
bool condition(Uri), Uri newValue) → void -
Updates the
ValueNotifier
's value tonewValue
ifcondition
returns true.inherited -
updateOnAction<
R> (R action()) → R -
Will notifyListeners after a specific
action
has been made, and optionally return a resultR
of certain type.inherited -
write(
Uri? value) → dynamic -
write
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited