brush2D function
Brush2D
brush2D({
- required Widget child,
- void onBrushStart(
- Brush2DExtent extent
- void onBrush(
- Brush2DExtent extent
- void onBrushEnd(
- Brush2DExtent extent
- void 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,
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,
);
}