Skip to content

Commit 291a7fd

Browse files
kenzieschmollCoderDake
authored andcommitted
Use PointerInterceptor in dialogs to allow clicks over an iFrame (flutter#4578)
1 parent 8310bb1 commit 291a7fd

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

packages/devtools_app/lib/src/shared/dialogs.dart

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/material.dart';
6+
import 'package:pointer_interceptor/pointer_interceptor.dart';
67

78
import 'common_widgets.dart';
89
import 'theme.dart';
@@ -42,27 +43,29 @@ class DevToolsDialog extends StatelessWidget {
4243

4344
@override
4445
Widget build(BuildContext context) {
45-
return AlertDialog(
46-
scrollable: scrollable,
47-
title: Column(
48-
children: [
49-
titleContent,
50-
includeDivider
51-
? const PaddedDivider(
52-
padding: EdgeInsets.only(bottom: denseRowSpacing),
53-
)
54-
: const SizedBox(height: defaultSpacing),
55-
],
46+
return PointerInterceptor(
47+
child: AlertDialog(
48+
scrollable: scrollable,
49+
title: Column(
50+
children: [
51+
titleContent,
52+
includeDivider
53+
? const PaddedDivider(
54+
padding: EdgeInsets.only(bottom: denseRowSpacing),
55+
)
56+
: const SizedBox(height: defaultSpacing),
57+
],
58+
),
59+
contentPadding: const EdgeInsets.fromLTRB(
60+
contentPadding,
61+
0,
62+
contentPadding,
63+
contentPadding,
64+
),
65+
content: content,
66+
actions: actions,
67+
buttonPadding: const EdgeInsets.symmetric(horizontal: defaultSpacing),
5668
),
57-
contentPadding: const EdgeInsets.fromLTRB(
58-
contentPadding,
59-
0,
60-
contentPadding,
61-
contentPadding,
62-
),
63-
content: content,
64-
actions: actions,
65-
buttonPadding: const EdgeInsets.symmetric(horizontal: defaultSpacing),
6669
);
6770
}
6871
}

packages/devtools_app/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ dependencies:
4545
path: ^1.8.0
4646
perfetto_compiled:
4747
path: ../../third_party/packages/perfetto_compiled
48+
pointer_interceptor: ^0.9.3+3
4849
provider: ^6.0.2
4950
# Only used for debug mode logic.
5051
shared_preferences: ^2.0.15

0 commit comments

Comments
 (0)