BrushX class

A 1D horizontal brush widget.

BrushX allows the user to select a horizontal range by clicking and dragging. The selection spans the full height of the widget.

Inheritance

Constructors

BrushX({Key? key, required Widget child, void onBrushStart(BrushExtent extent)?, void onBrush(BrushExtent extent)?, void onBrushEnd(BrushExtent extent)?, void onBrushClear()?, BrushExtent? initialExtent, Color overlayColor = const Color(0x20000000), Color borderColor = const Color(0x80000000), double borderWidth = 1.0, double minSelectionSize = 5.0, bool movable = true, bool resizable = true, double handleSize = 10.0, bool clearOnDoubleTap = true})
Creates a BrushX widget.
const

Properties

borderColor → Color
The color of the brush selection border.
finalinherited
borderWidth → double
The width of the brush selection border.
finalinherited
child → Widget
The child widget to render inside the brush area.
finalinherited
clearOnDoubleTap → bool
Whether to clear the selection on double-tap.
finalinherited
handleSize → double
The size of the resize handles.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
initialExtent → BrushExtent?
The initial extent of the brush.
finalinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minSelectionSize → double
The minimum size of a brush selection.
finalinherited
movable → bool
Whether the brush selection can be moved.
finalinherited
onBrush → void Function(BrushExtent extent)?
Called when the brush selection changes.
finalinherited
onBrushClear → void Function()?
Called when the brush is cleared.
finalinherited
onBrushEnd → void Function(BrushExtent extent)?
Called when a brush selection is ended.
finalinherited
onBrushStart → void Function(BrushExtent extent)?
Called when a brush selection is started.
finalinherited
overlayColor → Color
The color of the brush selection overlay.
finalinherited
resizable → bool
Whether the brush selection can be resized.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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