From 425da3ab7de15fb9349b5380487dbb766c5aba7f Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Sat, 25 Apr 2026 19:59:36 +0200 Subject: [PATCH] fix(overlay-sheet): wrap barrier in Positioned.fill --- lib/widgets/overlay_sheet.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/widgets/overlay_sheet.dart b/lib/widgets/overlay_sheet.dart index 56fc4809..c7c5e2ac 100644 --- a/lib/widgets/overlay_sheet.dart +++ b/lib/widgets/overlay_sheet.dart @@ -463,14 +463,16 @@ class _OverlaySheetHostState extends State with SingleTickerPr widget.child, // Barrier + sheet only when open if (_isOpen) ...[ - AnimatedBuilder( - animation: _barrierAnimation, - builder: (context, child) { - return GestureDetector( - onTap: _barrierDismissible ? () => _close() : null, - child: ColoredBox(color: Colors.black.withValues(alpha: _barrierAnimation.value)), - ); - }, + Positioned.fill( + child: AnimatedBuilder( + animation: _barrierAnimation, + builder: (context, child) { + return GestureDetector( + onTap: _barrierDismissible ? () => _close() : null, + child: ColoredBox(color: Colors.black.withValues(alpha: _barrierAnimation.value)), + ); + }, + ), ), _buildSheet(context), ],