Shape constructor
Shape({
- Paint? paint,
- Map<
GestureType, Function> ? gestureCallbackMap, - HitTestBehavior? hitTestBehavior,
Implementation
Shape({
Paint? paint,
Map<GestureType, Function>? gestureCallbackMap,
HitTestBehavior? hitTestBehavior,
}) : paint = paint ??
(Paint()
..strokeWidth = ShapeConstant.floatPrecision
..style = PaintingStyle.fill),
gestureCallbackMap = gestureCallbackMap ?? {},
hitTestBehavior = hitTestBehavior ?? HitTestBehavior.opaque {
if (this.paint.strokeWidth == 0) {
this.paint.strokeWidth = ShapeConstant.floatPrecision;
}
}