brush2D function

Brush2D brush2D({
  1. required Widget child,
  2. void onBrushStart(
    1. Brush2DExtent extent
    )?,
  3. void onBrush(
    1. Brush2DExtent extent
    )?,
  4. void onBrushEnd(
    1. Brush2DExtent extent
    )?,
  5. void onBrushClear()?,
  6. Brush2DExtent? initialExtent,
  7. Color overlayColor = const Color(0x20000000),
  8. Color borderColor = const Color(0x80000000),
  9. double borderWidth = 1.0,
  10. double minSelectionSize = 5.0,
  11. bool movable = true,
  12. bool resizable = true,
  13. double handleSize = 10.0,
  14. bool clearOnDoubleTap = true,
})

Creates a Brush2D widget with the given parameters.

Implementation

Brush2D brush2D({
  required Widget child,
  void Function(Brush2DExtent extent)? onBrushStart,
  void Function(Brush2DExtent extent)? onBrush,
  void Function(Brush2DExtent extent)? onBrushEnd,
  void Function()? onBrushClear,
  Brush2DExtent? 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,
}) {
  return Brush2D(
    onBrushStart: onBrushStart,
    onBrush: onBrush,
    onBrushEnd: onBrushEnd,
    onBrushClear: onBrushClear,
    initialExtent: initialExtent,
    overlayColor: overlayColor,
    borderColor: borderColor,
    borderWidth: borderWidth,
    minSelectionSize: minSelectionSize,
    movable: movable,
    resizable: resizable,
    handleSize: handleSize,
    clearOnDoubleTap: clearOnDoubleTap,
    child: child,
  );
}