lensInPlatter property

Rect get lensInPlatter

The lens in platter coordinates: its bounds (the pill grown by the lift) with its flex scale, drifted by the flex.

Implementation

Rect get lensInPlatter {
  // UIKit's lens grows 8pt past the pill all round, rising 4pt out of its
  // 62pt bar; in a bar with more padding it rises out by as much,
  // growing further up and down.
  final double g = math.max(_growth.value, -0.25);
  final double side = liftOutset * g;
  final double up = (liftOutset - inset + _padding.top) * g;
  final double down = (liftOutset - inset + _padding.bottom) * g;
  return Rect.fromCenter(
    center: Offset(lensX + _flexShift.value, tabMiddle + (down - up) / 2),
    width: (pillWidth + 2 * side) * _flexX.value,
    height: (pillHeight + up + down) * _flexY.value,
  );
}