From a2e4e463b5424b9e2a09b3d6eb471f72c1de3d1b Mon Sep 17 00:00:00 2001 From: malik1004x Date: Tue, 9 Dec 2025 03:18:07 +0100 Subject: [PATCH] fix: alert close button clipping under navbar (#2715) --- lib/src/widgets/alert_close_button.dart | 40 +++++++++++++------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/lib/src/widgets/alert_close_button.dart b/lib/src/widgets/alert_close_button.dart index 83664063d..c7510feeb 100644 --- a/lib/src/widgets/alert_close_button.dart +++ b/lib/src/widgets/alert_close_button.dart @@ -18,25 +18,27 @@ class AlertCloseButton extends StatelessWidget { @override Widget build(BuildContext context) { - final button = GestureDetector( - onTap: onTap ?? () => Navigator.of(context).pop(), - child: Semantics( - label: S.of(context).close, - button: true, - enabled: true, - child: Container( - height: 42, - width: 42, - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.onSurface, - shape: BoxShape.circle, - ), - child: Center( - child: image ?? - Image.asset( - 'assets/images/close.png', - color: Theme.of(context).colorScheme.surface, - ), + final button = SafeArea( + child: GestureDetector( + onTap: onTap ?? () => Navigator.of(context).pop(), + child: Semantics( + label: S.of(context).close, + button: true, + enabled: true, + child: Container( + height: 42, + width: 42, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.onSurface, + shape: BoxShape.circle, + ), + child: Center( + child: image ?? + Image.asset( + 'assets/images/close.png', + color: Theme.of(context).colorScheme.surface, + ), + ), ), ), ),