Skip to content

Commit d6e3f97

Browse files
Fix missing when is pressed
1 parent 716ff2b commit d6e3f97

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/utils/popup_overlay_renderer.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ class PopupOverlayRenderer {
1919
final _createdEntry = OverlayEntry(
2020
builder: (context) => GestureDetector(
2121
behavior: HitTestBehavior.opaque,
22-
onTapDown: (details) {
23-
dismiss();
24-
onClose?.call(details);
25-
},
22+
onTapDown: onClose,
2623
child: Material(
2724
color: Colors.transparent,
2825
type: MaterialType.canvas,
2926
child: Stack(
3027
children: [
3128
CustomSingleChildLayout(
3229
delegate: PopupOverlayLayoutDelegate(position),
33-
child: popupBuilder(context),
30+
child: TapRegion(
31+
onTapOutside: (_) => dismiss(),
32+
child: popupBuilder(context),
33+
),
3434
),
3535
],
3636
),

0 commit comments

Comments
 (0)