getFollowerConstraints method

  1. @override
BoxConstraints getFollowerConstraints({
  1. required Size targetSize,
  2. required BoxConstraints theaterConstraints,
})
override

Returns the layout constraints that are given to the follower element.

The targetSize represents the bounds of the element which the follower element should be anchored to. This must be the same value that is passed to getFollowerOffset. No assumptions should be made about the coordinate space, i.e. only the size of the target should be considered.

The theaterConstraints represent the full available space to place the follower element in. This is irrespective of where the target is positioned within the full available space.

Implementation

@override
BoxConstraints getFollowerConstraints({
  required Size targetSize,
  required BoxConstraints theaterConstraints,
}) {
  return BoxConstraints.tight(theaterConstraints.biggest);
}