Fix: correctly set search history overlay width by using widget.maxWidth directly instead of querying render box during animation
This commit is contained in:
1 parent
888803e9c0
commit
7db281547e
1 file changed
+1
-4
@@ -89,12 +89,9 @@ class _AppSearchBarState extends ConsumerState<AppSearchBar> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted || _overlayEntry != null || !_focusNode.hasFocus) return;
|
||||
|
||||
final renderBox = context.findRenderObject() as RenderBox?;
|
||||
final actualWidth = renderBox?.size.width ?? 420.0;
|
||||
|
||||
_overlayEntry = OverlayEntry(
|
||||
builder: (context) => Positioned(
|
||||
width: actualWidth,
|
||||
width: widget.maxWidth,
|
||||
child: CompositedTransformFollower(
|
||||
link: _layerLink,
|
||||
showWhenUnlinked: false,
|
||||
|
||||
Reference in new issue
Block a user