BetterInteractiveViewerBase class abstract

A Base Class to build InteractiveViewer like widgets, with support for scrollbars, tap to zoom, better viewport sizing, etc.

Inheritance
Implementers

Constructors

BetterInteractiveViewerBase({Key? key, bool allowNonCoveringScreenZoom = true, PanAxis panAxis = PanAxis.free, double maxScale = 2.5, double minScale = 0.2, double interactionEndFrictionCoefficient = _kDrag, bool panEnabled = true, bool scaleEnabled = true, bool showScrollbars = true, bool noMouseDragScroll = true, double scaleFactor = kDefaultMouseScrollToScaleFactor, TransformationController? transformationController, bool doubleTapToZoom = true})

Properties

allowNonCoveringScreenZoom bool
Allows the user to zoom out the child so that it is displayed smaller than the viewports width and height.
final
doubleTapToZoom bool
Allows the user to zoom by double tapping.
final
hashCode int
The hash code for this object.
no setterinherited
interactionEndFrictionCoefficient double
Changes the deceleration behavior after a gesture.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxScale double
The maximum allowed scale.
final
minScale double
The minimum allowed scale.
final
noMouseDragScroll bool
When true, disables drag scrolling with the mouse. Only mouse wheel zooming, and when enabled scrollbar zooming, is allowed then.
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
showScrollbars bool
Whether to show scrollbars.
final
transformationController TransformationController?
A TransformationController for the transformation performed on the child.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() BetterInteractiveViewerBaseState<BetterInteractiveViewerBase>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

getAxisAlignedBoundingBox(Quad quad) → Quad
Given a quad, return its axis aligned bounding box.
getNearestPointInside(Vector3 point, Quad quad) → Vector3
Get the point inside (inclusively) the given Quad that is nearest to the given Vector3.
getNearestPointOnLine(Vector3 point, Vector3 l1, Vector3 l2) → Vector3
Returns the closest point to the given point on the given line segment.
pointIsInside(Vector3 point, Quad quad) bool
Returns true iff the point is inside the rectangle given by the Quad, inclusively. Algorithm from https://math.stackexchange.com/a/190373.