DataShapeAdapter class
Backward-compatible facade over the registry-backed data-shape tools.
The canonical shape inference and switching rules live in
registry_tools.dart so validation, registry diagnostics, and runtime
switching all make the same decision for the same payload.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
adapt(
Map< String, dynamic> json, ChartType targetType, {bool force = true}) → Map<String, dynamic> -
Adapts the
jsonpayload to be compatible withtargetType. -
compatibility(
Map< String, dynamic> json, ChartType targetType, {bool registeredOnly = true}) → ChartSwitchCompatibility -
Returns a non-throwing explanation for whether
targetTypecan consume this payload directly or via a supported force conversion. -
compatibleTypes(
Map< String, dynamic> json, {bool registeredOnly = true}) → List<ChartType> - Returns chart types that can consume this payload without reshaping.
-
inferShape(
Map< String, dynamic> json) → ChartSeriesDataShape - Infers the dominant data shape from a JSON chart config.
-
isCompatible(
Map< String, dynamic> json, ChartType targetType, {bool registeredOnly = true}) → bool -
True when
targetTypecan consume the payload's inferred shape directly. -
targetShape(
ChartType type) → ChartSeriesDataShape - Returns the expected data shape for a chart type.
-
tryAdapt(
Map< String, dynamic> json, ChartType targetType, {bool force = false, bool registeredOnly = true}) → ChartTypeSwitchResult - Non-throwing variant of adapt for UI/runtime chart switching.
-
tryAdaptAuto(
Map< String, dynamic> json, {List<ChartType> ? preferredOrder, bool includeCurrentType = false, bool registeredOnly = true}) → ChartAutoSwitchResult - Non-throwing auto-switch variant for UI/runtime chart switching.
-
tryAdaptAutoValidated(
Map< String, dynamic> json, {List<ChartType> ? preferredOrder, bool includeCurrentType = false, bool registeredOnly = true, bool deep = true, bool requireRegisteredType = true}) → ValidatedChartAutoSwitchResult - Non-throwing auto-switch plus post-switch validation.
-
tryAdaptValidated(
Map< String, dynamic> json, ChartType targetType, {bool force = false, bool registeredOnly = true, bool deep = true, bool requireRegisteredType = true}) → ValidatedChartTypeSwitchResult - Non-throwing switch plus post-switch validation.