JsonInteractiveViewer class

Inheritance

Constructors

JsonInteractiveViewer({Map<String, dynamic> args = const {}, JsonWidgetRegistry? registry, bool alignPanAxis = false, Alignment? alignment, EdgeInsets boundaryMargin = EdgeInsets.zero, Clip clipBehavior = Clip.hardEdge, bool constrained = true, dynamic interactionEndFrictionCoefficient = 0.0000135, double maxScale = 2.5, double minScale = 0.8, void onInteractionEnd(ScaleEndDetails)?, void onInteractionStart(ScaleStartDetails)?, void onInteractionUpdate(ScaleUpdateDetails)?, PanAxis panAxis = PanAxis.free, bool panEnabled = true, bool scaleEnabled = true, double scaleFactor = kDefaultMouseScrollToScaleFactor, bool trackpadScrollCausesScale = false, TransformationController? transformationController, required JsonWidgetData child})

Properties

alignment Alignment?
The alignment of the child's origin, relative to the size of the box.
final
alignPanAxis bool
This property is deprecated, please use panAxis instead.
final
boundaryMargin EdgeInsets
A margin for the visible boundaries of the child.
final
child JsonWidgetData
The child Widget that is transformed by InteractiveViewer.
final
clipBehavior Clip
If set to Clip.none, the child may extend beyond the size of the InteractiveViewer, but it will not receive gestures in these areas. Be sure that the InteractiveViewer is the desired size when using Clip.none.
final
constrained bool
Whether the normal size constraints at this point in the widget tree are applied to the child.
final
hashCode int
The hash code for this object.
no setterinherited
interactionEndFrictionCoefficient → dynamic
Changes the deceleration behavior after a gesture.
final
jsonWidgetArgs → dynamic
finalinherited
jsonWidgetBuilder JsonWidgetBuilder Function()
finalinherited
jsonWidgetId String
finalinherited
jsonWidgetListenVariables Set<String>
finalinherited
jsonWidgetRegistry JsonWidgetRegistry
finalinherited
jsonWidgetType String
finalinherited
maxScale double
The maximum allowed scale.
final
minScale double
The minimum allowed scale.
final
onInteractionEnd → (void Function(ScaleEndDetails)?)
Called when the user ends a pan or scale gesture on the widget.
final
onInteractionStart → (void Function(ScaleStartDetails)?)
Called when the user begins a pan or scale gesture on the widget.
final
onInteractionUpdate → (void Function(ScaleUpdateDetails)?)
Called when the user updates a pan or scale gesture on the widget.
final
panAxis PanAxis
When set to PanAxis.aligned, panning is only allowed in the horizontal axis or the vertical axis, diagonal panning is not allowed.
final
panEnabled bool
If false, the user will be prevented from panning.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleEnabled bool
If false, the user will be prevented from scaling.
final
scaleFactor double
Determines the amount of scale to be performed per pointer scroll.
final
trackpadScrollCausesScale bool
Whether scrolling up/down on a trackpad should cause scaling instead of panning.
final
transformationController TransformationController?
A TransformationController for the transformation performed on the child.
final

Methods

build({ChildWidgetBuilder? childBuilder, required BuildContext context, JsonWidgetRegistry? registry}) Widget
Convenience method that can build the widget this data object represents. This is the equilivant of calling: builder.build and passing this in as the data parameter.
inherited
copyWith({dynamic jsonWidgetArgs, JsonWidgetBuilder? jsonWidgetBuilder, Set<String>? jsonWidgetListenVariables, String? jsonWidgetId, JsonWidgetRegistry? jsonWidgetRegistry, String? jsonWidgetType}) JsonWidgetData
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
inherited
toString() String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited