Brush class abstract

Base class for brush behavior.

A brush allows the user to select a region of a chart by clicking and dragging. This is commonly used for zooming, filtering, or highlighting data.

Inheritance
Implementers

Constructors

Brush({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 Brush widget.
const

Properties

borderColor Color
The color of the brush selection border.
final
borderWidth double
The width of the brush selection border.
final
child Widget
The child widget to render inside the brush area.
final
clearOnDoubleTap bool
Whether to clear the selection on double-tap.
final
handleSize double
The size of the resize handles.
final
hashCode int
The hash code for this object.
no setterinherited
initialExtent BrushExtent?
The initial extent of the brush.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minSelectionSize double
The minimum size of a brush selection.
final
movable bool
Whether the brush selection can be moved.
final
onBrush → void Function(BrushExtent extent)?
Called when the brush selection changes.
final
onBrushClear → void Function()?
Called when the brush is cleared.
final
onBrushEnd → void Function(BrushExtent extent)?
Called when a brush selection is ended.
final
onBrushStart → void Function(BrushExtent extent)?
Called when a brush selection is started.
final
overlayColor Color
The color of the brush selection overlay.
final
resizable bool
Whether the brush selection can be resized.
final
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<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
inherited
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