FlickController class

The widget that is responsible of ALL Flick related logic and UI. It is important to define two essential concepts used for this package: I) The view is what is being moved. It is the widget that flicks. II) The bound is what constrains the view.

Inheritance

Constructors

FlickController(Widget uiChild, bool useCache, GlobalKey<State<StatefulWidget>> viewKey, {Key? key, GlobalKey<State<StatefulWidget>>? boundKey, Offset? constraintsMin, Offset? constraintsMax, Offset? flexibilityMin, Offset? flexibilityMax, double customBoundWidth = 0, double customBoundHeight = 0, double sensitivity = 0.05, MoveCallback? onMove, DragCallback? onDragStart, DragCallback? onDragUpdate, DragCallback? onDragEnd, FlickCallback? onFlick})
const

Properties

boundKey → GlobalKey<State<StatefulWidget>>?
The GlobalKey of the bound. If set, constraintsMin, constraintsMax, flexibilityMin and flexibilityMax can't be null.
final
constraintsMax → Offset?
Use this value to set the upper right boundary of the movement. boundKey can't be null.
final
constraintsMin → Offset?
Use this value to set the lower left boundary of the movement. boundKey can't be null.
final
customBoundHeight → double
Use this value to set a custom bound height. If not set, FlickController will automatically calculate it via boundKey.
final
customBoundWidth → double
Use this value to set a custom bound width. If not set, FlickController will automatically calculate it via boundKey.
final
flexibilityMax → Offset?
Use this value to set the upper right elasticity of the movement. boundKey can't be null.
final
flexibilityMin → Offset?
Use this value to set the lower left elasticity of the movement. boundKey can't be null.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDragEnd → DragCallback?
The callback for when the drag ends.
final
onDragStart → DragCallback?
The callback for when the drag starts.
final
onDragUpdate → DragCallback?
The callback for when the drag updates.
final
onFlick → FlickCallback?
The callback for when the view flicks.
final
onMove → FlickCallback?
The callback for when the view moves.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sensitivity → double
Use this value to set the sensitivity of the flick.
final
uiChild → Widget
The widget that is to be displayed on your UI.
final
useCache → bool
Set this to true if your uiChild doesn't change at runtime.
final
viewKey → GlobalKey<State<StatefulWidget>>
The GlobalKey of the view.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FlickControllerState
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