INNER CODE UNIT · Dart
cmp
LanarsInc/animated-bottom-navigation-bar-flutter · lib/src/circular_notched_and_cornered_shape.dart:116
double cmp = b < 0 ? -1.0 : 1.0;
p[2] = cmp * p2yA > cmp * p2yB ? Offset(p2xA, p2yA) : Offset(p2xB, p2yB);
// p3, p4, and p5 are the control points for segment B, which is a mirror
// of segment A around the y axis.
p[3] = Offset(-1.0 * p[2].dx, p[2].dy);
p[4] = Offset(-1.0 * p[1].dx, p[1].dy);
p[5] = Offset(-1.0 * p[0].dx, p[0].dy);
// translate all points back to the absolute coordinate system.
for (int i = 0; i < p.length; i += 1) {
p[i] += guest.center;
}
return Path()
..moveTo(host.left, host.bottom)
..lineTo(host.left, host.top + leftCornerRadius)
..arcToPoint(