getSize method
The size of this object given the incoming constraints.
Defaults to the biggest size that satisfies the given constraints.
Implementation
@override
Size getSize(BoxConstraints constraints) {
debugPrint('TextSearchResultDelegate: getSize(): width=${_size.value.width}, minHeight=$minHeight, maxHeight=$maxHeight, constraints=${constraints} -------');
// Use constraints from parent (ConstrainedBox) if available, otherwise use maxHeight
// This allows the ConstrainedBox to properly constrain the layout
final double height = constraints.hasBoundedHeight && constraints.maxHeight < double.infinity
? constraints.maxHeight
: maxHeight;
return Size(_size.value.width, height);
}