We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 716ff2b commit d6e3f97Copy full SHA for d6e3f97
lib/utils/popup_overlay_renderer.dart
@@ -19,18 +19,18 @@ class PopupOverlayRenderer {
19
final _createdEntry = OverlayEntry(
20
builder: (context) => GestureDetector(
21
behavior: HitTestBehavior.opaque,
22
- onTapDown: (details) {
23
- dismiss();
24
- onClose?.call(details);
25
- },
+ onTapDown: onClose,
26
child: Material(
27
color: Colors.transparent,
28
type: MaterialType.canvas,
29
child: Stack(
30
children: [
31
CustomSingleChildLayout(
32
delegate: PopupOverlayLayoutDelegate(position),
33
- child: popupBuilder(context),
+ child: TapRegion(
+ onTapOutside: (_) => dismiss(),
+ child: popupBuilder(context),
+ ),
34
),
35
],
36
0 commit comments