bezierTo method
void
bezierTo({})
Add bezier curve.
If the control1
and control2
are null, the mothod will use lineTo.
If control2
is null, will use bezier2To.
If control1
and control2
are not null, will use bezier3To.
Implementation
void bezierTo({
required Offset target,
Offset? control1,
Offset? control2,
DrawPaint paint = const DrawPaint(),
}) {
if (control1 == null) {
lineTo(target);
return;
}
if (control2 == null) {
bezier2To(target, control1);
return;
}
bezier3To(target, control1, control2);
}