Skip to content

Commit cf4832c

Browse files
committed
fix/constraints to select header and footer
1 parent bf8a99a commit cf4832c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

lib/src/components/select.dart

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,13 @@ class ShadSelectState<T> extends State<ShadSelect<T>> {
684684
child: search,
685685
),
686686
),
687-
if (widget.header != null) widget.header!,
687+
if (widget.header != null)
688+
Flexible(
689+
child: ConstrainedBox(
690+
constraints: effectiveConstraints,
691+
child: widget.header,
692+
),
693+
),
688694
if (scrollToTopChild != null) scrollToTopChild,
689695
Flexible(
690696
child: ConstrainedBox(
@@ -693,7 +699,13 @@ class ShadSelectState<T> extends State<ShadSelect<T>> {
693699
),
694700
),
695701
if (scrollToBottomChild != null) scrollToBottomChild,
696-
if (widget.footer != null) widget.footer!,
702+
if (widget.footer != null)
703+
Flexible(
704+
child: ConstrainedBox(
705+
constraints: effectiveConstraints,
706+
child: widget.footer,
707+
),
708+
),
697709
],
698710
),
699711
);

0 commit comments

Comments
 (0)