fix: alert close button clipping under navbar (#2715)
malik1004x committed
Dec 9, 2025 at 03:18 UTC
a2e4e463b5424b9e2a09b3d6eb471f72c1de3d1b
1 file changed
+21
-19
lib/src/widgets/alert_close_button.dart
+21
-19
@@ -18,25 +18,27 @@ class AlertCloseButton extends StatelessWidget {
18
19
@override
20
Widget build(BuildContext context) {
21
- final button = GestureDetector(
22
- onTap: onTap ?? () => Navigator.of(context).pop(),
23
- child: Semantics(
24
- label: S.of(context).close,
25
- button: true,
26
- enabled: true,
27
- child: Container(
28
- height: 42,
29
- width: 42,
30
- decoration: BoxDecoration(
31
- color: Theme.of(context).colorScheme.onSurface,
32
- shape: BoxShape.circle,
33
- ),
34
- child: Center(
35
- child: image ??
36
- Image.asset(
37
- 'assets/images/close.png',
38
- color: Theme.of(context).colorScheme.surface,
39
- ),
21
+ final button = SafeArea(
22
+ child: GestureDetector(
23
+ onTap: onTap ?? () => Navigator.of(context).pop(),
24
+ child: Semantics(
25
+ label: S.of(context).close,
26
+ button: true,
27
+ enabled: true,
28
+ child: Container(
29
+ height: 42,
30
+ width: 42,
31
+ decoration: BoxDecoration(
32
+ color: Theme.of(context).colorScheme.onSurface,
33
+ shape: BoxShape.circle,
34
+ ),
35
+ child: Center(
36
+ child: image ??
37
+ Image.asset(
38
+ 'assets/images/close.png',
39
+ color: Theme.of(context).colorScheme.surface,
40
+ ),
41
+ ),
42
),
43
),
44
),