NetworkAdaptiveCardContentProvider class
Card source that fetches JSON over HTTP(S).
The url is untrusted, so it is validated against uriPolicy before any
request (blocking SSRF to loopback/private hosts) and the response body is
capped by fetchPolicy. Pass an optional client to inject HTTP in tests.
- Implemented types
Constructors
- NetworkAdaptiveCardContentProvider({required String url, AdaptiveUriPolicy uriPolicy = AdaptiveUriPolicy.standard, AdaptiveFetchPolicy fetchPolicy = AdaptiveFetchPolicy.standard, Client? client})
-
Fetches card JSON from a remote
urlwhen content is requested.
Properties
- fetchPolicy → AdaptiveFetchPolicy
-
Policy bounding the response size and request timeout.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uriPolicy → AdaptiveUriPolicy
-
Policy validating url before the request is issued.
final
- url ↔ String
-
Remote URL fetched when the canvas loads.
getter/setter pair
Methods
-
loadAdaptiveCardContent(
) → Future< Map< String, dynamic> > -
Called by the canvas on first build; return the parsed root
AdaptiveCardmap.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.
inherited