buildCustom method
InteractiveViewer
buildCustom({
- ChildWidgetBuilder? childBuilder,
- required BuildContext context,
- required JsonWidgetData data,
- Key? key,
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
Implementation
@override
InteractiveViewer buildCustom({
ChildWidgetBuilder? childBuilder,
required BuildContext context,
required JsonWidgetData data,
Key? key,
}) {
final model = createModel(
childBuilder: childBuilder,
data: data,
);
final interactionEndFrictionCoefficientDecoded =
_decodeInteractionEndFrictionCoefficient(
value: model.interactionEndFrictionCoefficient,
);
return InteractiveViewer(
alignment: model.alignment,
boundaryMargin: model.boundaryMargin,
clipBehavior: model.clipBehavior,
constrained: model.constrained,
interactionEndFrictionCoefficient:
interactionEndFrictionCoefficientDecoded,
key: key,
maxScale: model.maxScale,
minScale: model.minScale,
onInteractionEnd: model.onInteractionEnd,
onInteractionStart: model.onInteractionStart,
onInteractionUpdate: model.onInteractionUpdate,
panAxis: model.panAxis,
panEnabled: model.panEnabled,
scaleEnabled: model.scaleEnabled,
scaleFactor: model.scaleFactor,
trackpadScrollCausesScale: model.trackpadScrollCausesScale,
transformationController: model.transformationController,
child: model.child.build(
childBuilder: childBuilder,
context: context,
),
);
}