DrawingBoard class
画板
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DrawingBoard
Constructors
- DrawingBoard({Key? key, required Widget background, DrawingController? controller, bool showDefaultActions = false, bool showDefaultTools = false, dynamic onPointerDown(PointerDownEvent pde)?, dynamic onPointerMove(PointerMoveEvent pme)?, dynamic onPointerUp(PointerUpEvent pue)?, Clip clipBehavior = Clip.antiAlias, DefaultToolsBuilder? defaultToolsBuilder, Clip boardClipBehavior = Clip.hardEdge, PanAxis panAxis = PanAxis.free, EdgeInsets? boardBoundaryMargin, bool boardConstrained = false, double maxScale = 20, double minScale = 0.2, bool boardPanEnabled = true, bool boardScaleEnabled = true, double boardScaleFactor = 200.0, void onInteractionEnd(ScaleEndDetails)?, void onInteractionStart(ScaleStartDetails)?, void onInteractionUpdate(ScaleUpdateDetails)?, TransformationController? transformationController, AlignmentGeometry alignment = Alignment.topCenter})
-
const
Properties
- alignment → AlignmentGeometry
-
final
- background → Widget
-
画板背景控件
final
- boardBoundaryMargin → EdgeInsets?
-
final
- boardClipBehavior → Clip
-
缩放板属性
final
- boardConstrained → bool
-
final
- boardPanEnabled → bool
-
final
- boardScaleEnabled → bool
-
final
- boardScaleFactor → double
-
final
- clipBehavior → Clip
-
边缘裁剪方式
final
- controller → DrawingController?
-
画板控制器
final
- defaultToolsBuilder → DefaultToolsBuilder?
-
默认工具栏构建器
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxScale → double
-
final
- minScale → double
-
final
- onInteractionEnd → (void Function(ScaleEndDetails)?)
-
final
- onInteractionStart → (void Function(ScaleStartDetails)?)
-
final
- onInteractionUpdate → (void Function(ScaleUpdateDetails)?)
-
final
- onPointerDown → (dynamic Function(PointerDownEvent pde)?)
-
开始拖动
final
- onPointerMove → (dynamic Function(PointerMoveEvent pme)?)
-
正在拖动
final
- onPointerUp → (dynamic Function(PointerUpEvent pue)?)
-
结束拖动
final
- panAxis → PanAxis
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDefaultActions → bool
-
显示默认样式的操作栏
final
- showDefaultTools → bool
-
显示默认样式的工具栏
final
- transformationController → TransformationController?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DrawingBoard> -
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}) → 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
-
defaultTools(
Type currType, DrawingController controller) → List< DefToolItem> - 默认工具项列表