Skip to content

Commit c4fe09d

Browse files
Use AnimatedSize instead of AnimatedContainer for better animation
Replaced AnimatedContainer with AnimatedSize for the selected styles banner. AnimatedSize properly handles intrinsic height transitions without needing to specify explicit heights, providing smoother and more predictable animations. Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
1 parent 3cf8e7f commit c4fe09d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/screens/drinks_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,9 +894,9 @@ class _StyleFilterSheet extends StatelessWidget {
894894
),
895895
const SizedBox(height: 8),
896896
// Always reserve space for selected styles to prevent list jumping
897-
AnimatedContainer(
897+
AnimatedSize(
898898
duration: const Duration(milliseconds: 200),
899-
height: selectedStyles.isNotEmpty ? null : 0,
899+
curve: Curves.easeInOut,
900900
child: selectedStyles.isNotEmpty
901901
? Container(
902902
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),

0 commit comments

Comments
 (0)