flutter_adaptive_cards_fs library

Render Adaptive Cards in Flutter host apps.

Use AdaptiveCardsCanvas to load card JSON, apply HostConfigs, and wire host callbacks; use RawAdaptiveCard when you already have a parsed card map.

Classes

AdaptiveActionUpdate
Action overlay patch for Action.* nodes.
AdaptiveCardContentProvider
Async source of root card JSON for AdaptiveCardsCanvas.
AdaptiveCardsCanvas
Host entry widget: loads card JSON, applies HostConfigs, and renders RawAdaptiveCard.
AdaptiveElementUpdate
One element's runtime overlay patch (baseline JSON unchanged).
AdaptiveFetchPolicy
Limits applied to card-initiated HTTP GETs.
AdaptiveUriAllowed
The validated URL passed every policy check.
AdaptiveUriDenied
The URL was rejected by policy.
AdaptiveUriPolicy
Validates card-controlled URLs before they are launched or fetched.
AdaptiveUriValidationResult
Outcome of AdaptiveUriPolicy.validate.
AssetAdaptiveCardContentProvider
Card source that reads JSON from the Flutter asset bundle.
AuthCardButton
A single button inside an AuthenticationConfig.buttons list.
AuthenticationConfig
Root-level authentication object on an Adaptive Card (v1.4+).
CardOverlayExtensionRegistry
Registry of ElementOverlayExtension instances for one card scope.
CardTypeRegistry
Entry point for registering adaptive cards
Choice
Choice model for AdaptiveCards Input.ChoiceSet element
DataQuery
Parsed Data.Query object from choices.data on Input.ChoiceSet.
ElementOverlayExtension
Optional-package hook for merging extension-specific overlay fields.
ExecuteActionInvoke
Payload delivered to the host onExecute callback.
Fact
Fact model for AdaptiveCards FactSet element
HostConfig
Parsed Adaptive Cards HostConfig JSON that maps spec tokens to Flutter styling.
HostConfigs
Light and dark HostConfig pair with a mutable current selection.
HttpActionHeader
A single HTTP header carried by an HttpActionInvoke.
HttpActionInvoke
Payload delivered to the host onHttp callback for Action.Http.
InheritedAdaptiveCardHandlers
Host callback bundle for action and input events.
InheritedAdaptiveCardSecurityPolicy
Supplies the active AdaptiveUriPolicy and AdaptiveFetchPolicy to the adaptive-card widget subtree.
InputChangeInvoke
Payload delivered to the host onChange callback when an input value changes.
JsonAdaptiveCardContentProvider
Card source that decodes a JSON string at load time.
MediaSource
MediaSource model for AdaptiveCards Media element
MemoryAdaptiveCardContentProvider
Synchronous in-memory card source when JSON is already parsed.
NetworkAdaptiveCardContentProvider
Card source that fetches JSON over HTTP(S).
OpenUrlActionInvoke
Payload delivered to the host onOpenUrl callback.
OpenUrlDialogActionInvoke
Payload delivered to the host onOpenUrlDialog callback.
OverlayCapabilityRegistry
Maps JSON element/action type strings to supported overlay fields.
RawAdaptiveCard
Low-level card renderer when you already have parsed JSON.
RawAdaptiveCardState
Host-facing card state: runtime overlays, validation, and imperative updates without mutating baseline JSON.
RefreshActionInvoke
Payload delivered to the host onRefresh callback.
RefreshConfig
Root-level refresh object on an Adaptive Card (v1.4+).
SigninActionInvoke
Payload delivered to the host onSignin callback for a card authentication sign-in button.
SubmitActionInvoke
Payload delivered to the host onSubmit callback.
TextRunModel
Parsed TextRun inline from a RichTextBlock inlines array.

Enums

ActionOverlayField
Runtime overlay patch field on an action (AdaptiveActionUpdate / host map).
AdaptiveCardBrightnessMode
How RawAdaptiveCard selects between HostConfigs.light and HostConfigs.dark.
ElementOverlayField
Runtime overlay patch field on an element (AdaptiveElementUpdate / host map).

Functions

actionIdFromMap(Map<String, dynamic> actionMap) String?
Reads author-defined action id from card JSON, or null when absent or auto-injected at card load.
choicesFromJsonList(Object? raw) List<Choice>
Parses a card JSON choices array into Choice list; returns empty when invalid.
choicesToJsonList(List<Choice> choices) List<Map<String, dynamic>>
Serializes choices for runtime overlay / resolved JSON boundaries.
factsFromJsonList(Object? raw) List<Fact>
Parses a card JSON facts array; returns empty when invalid.
factsToJsonList(List<Fact> facts) List<Map<String, dynamic>>
Serializes facts for overlay merge boundaries.
fieldsSetInActionUpdate(AdaptiveActionUpdate update) Set<ActionOverlayField>
Returns overlay fields explicitly set on update.
fieldsSetInElementUpdate(AdaptiveElementUpdate update) Set<ElementOverlayField>
Returns overlay fields explicitly set on update.
inlinesFromJsonList(Object? raw) List<Map<String, dynamic>>
Parses a card JSON inlines array; returns empty when invalid.
inlinesToJsonList(List<Map<String, dynamic>> inlines) List<Map<String, dynamic>>
Serializes inlines for overlay merge boundaries.
mediaSourcesFromJsonList(Object? raw) List<MediaSource>
Parses Media sources array from card JSON.
readBodyWithLimit(List<int> body, int maxBytes) List<int>
Returns body unchanged when within maxBytes, otherwise throws AdaptiveFetchTooLargeException.

Typedefs

ElementCreator = Widget Function(Map<String, dynamic> map)
Custom element builder registered under an Adaptive Cards type string.

Exceptions / Errors

AdaptiveFetchTooLargeException
Thrown when a remote response body exceeds AdaptiveFetchPolicy.maxBytes.
AdaptiveUriPolicyException
Thrown by fetch paths (e.g. remote card loaders) when a URL fails AdaptiveUriPolicy validation and there is no UI affordance to report the denial inline.