getConstraintsForChild method

  1. @override
BoxConstraints getConstraintsForChild(
  1. BoxConstraints constraints
)
override

The tooltip gets loose constraints (up to screen size) and picks its own size; a tight box would stretch it over the whole screen.

Implementation

@override
BoxConstraints getConstraintsForChild(BoxConstraints constraints) =>
    constraints.loosen();