brushX function

BrushX brushX({
  1. required Widget child,
  2. void onBrushStart(
    1. BrushExtent extent
    )?,
  3. void onBrush(
    1. BrushExtent extent
    )?,
  4. void onBrushEnd(
    1. BrushExtent extent
    )?,
  5. void onBrushClear()?,
  6. BrushExtent? 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 BrushX widget with the given parameters.

Implementation

BrushX brushX({
  required Widget child,
  void Function(BrushExtent extent)? onBrushStart,
  void Function(BrushExtent extent)? onBrush,
  void Function(BrushExtent extent)? onBrushEnd,
  void Function()? 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,
}) {
  return BrushX(
    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,
  );
}