flutter_adaptive_cards_extend_fs library
Flutter Adaptive Cards
Used when creating new widgets that add to the AdaptiveCard widget set
Classes
- AdaptiveTappable
-
Wraps any element subtree to honor JSON
selectActiontaps in custom renderers. - AdaptiveTappableState
-
State for AdaptiveTappable that resolves and invokes
selectAction. - BarChartLayout
- Resolved layout values for bar chart types.
- BarChartLayoutSection
-
HostConfig
chartsLayout.barsection. - ChartsLayoutConfig
-
HostConfig
chartsLayoutsection for chart element dimensions and chrome. - ChildStyler
-
Pushes container
styleandhorizontalAlignmentinheritance to descendants via scoped resolver. - FadeAnimation
- One-shot fade-out wrapper that removes child when the animation completes.
- FadeAnimationState
- State object for FadeAnimation; not intended for direct host use.
- FullCircleClipper
- Rectangular clipper used for person-style image masks in card elements.
- LineChartLayout
-
Resolved layout values for
Chart.Linerendering. - LineChartLayoutSection
-
HostConfig
chartsLayout.linesection. - PieChartLayout
-
Resolved layout values for
Chart.Pie. - PieChartLayoutSection
-
HostConfig
chartsLayout.pie/chartsLayout.donutsection. - SeparatorElement
- Applies Adaptive Cards spacing and optional separator above child content in custom elements.
-
Tuple<
A, B> - Lightweight two-value holder for internal/extension helpers.
- UUIDGenerator
-
Shared id generation for elements missing author-supplied
idvalues.
Enums
- BarChartAlignmentToken
-
Token for bar group alignment (maps to fl_chart
BarChartAlignment).
Mixins
-
AdaptiveActionMixin<
T extends AdaptiveElementWidgetMixin> - Static action label/tooltip from baseline JSON for simple action widgets.
-
AdaptiveActionStateMixin<
T extends AdaptiveElementWidgetMixin> - Reactive action label, tooltip, and enabled state from merged baseline + overlays.
-
AdaptiveElementMixin<
T extends AdaptiveElementWidgetMixin> - Shared element identity and background-image helpers for adaptive widgets.
- AdaptiveElementWidgetMixin
- Contract for adaptive element widgets that expose JSON and a stable id.
-
AdaptiveInputMixin<
T extends ConsumerStatefulWidget> - Shared input overlay, validation, and value-changed-action behavior for input widgets.
-
AdaptiveTextualInputMixin<
T extends ConsumerStatefulWidget> - Marker mixin for text-like inputs that share AdaptiveInputMixin behavior.
-
AdaptiveVisibilityMixin<
T extends AdaptiveElementWidgetMixin> -
Subscribes to merged
isVisibleand exposes setIsVisible for hosts. -
ProviderScopeMixin<
T extends StatefulWidget> -
Reads card-scoped Riverpod providers from the enclosing
ProviderScope.
Functions
-
backgroundImageSpecified(
Map element) → bool -
Returns whether
elementdefines a usablebackgroundImagevalue. -
firstCharacterToLowerCase(
String s) → String -
Lowercases only the first character of
s. -
generateAdaptiveWidgetKey(
Map aMap) → ValueKey< String> -
Deterministic ValueKey for the adaptive wrapper widget (
{id}_adaptive). -
generateWidgetKey(
Map aMap, {String? suffix}) → ValueKey< String> - Deterministic ValueKey for an input/control from element JSON.
-
generateWidgetKeyFromId(
String id, {String? suffix}) → ValueKey< String> - Deterministic ValueKey from a resolved element id.
-
getDayOfMonthSuffix(
int n) → String -
Returns the English ordinal suffix (
st,nd,rd,th) for dayn. -
idIsNatural(
Map aMap) → bool -
True when
idwas author-supplied rather than auto-generated at card load. -
injectIds(
dynamic data) → void -
Ensures every typed JSON node has an
idbefore rendering; call on a copy, not host-owned maps. -
loadErrorMessage(
{required BuildContext context, String? errorMessage, bool showError = false}) → Widget -
Builds the validation error text below an input when
showErroris true. -
loadId(
Map aMap) → String - Resolves element id from JSON; generates one if missing (normally pre-injected).
-
loadLabel(
{required BuildContext context, String? label, bool isRequired = false}) → Widget - Builds the label row above an input using HostConfig label styles.
-
parseHexColor(
String? colorValue) → Color? -
Parses
#RRGGBBor#AARRGGBBhex strings into Color. -
parseHostConfigColor(
dynamic value) → Color? -
Parses HostConfig hex colors (
#RRGGBBor#AARRGGBB); returns null when invalid. -
parseIsVisible(
Object? value) → bool -
Parses Adaptive Card
isVisiblevalues from JSON (bool, string, or absent). -
parseMinHeight(
dynamic rawMinHeight) → double? -
Parses the
minHeightproperty from the Adaptive Cards JSON, supporting both pixel values (e.g."240px") and raw integer/double values. -
parseTextString(
String text, {String? locale}) → String -
Expands Adaptive Cards
{{DATE(...)}}and{{TIME(...)}}templates in display text.
Typedefs
- DonutChartLayout = PieChartLayout
-
Resolved layout values for
Chart.DonutandChart.Gauge(same shape as pie).