Skip to content

Commit 964452c

Browse files
committed
Improve widget selection in the inspector (Related ticket: flutter#3489)
1 parent 8062a22 commit 964452c

File tree

7 files changed

+688
-164
lines changed

7 files changed

+688
-164
lines changed

packages/devtools_app/lib/src/common_widgets.dart

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class IconLabelButton extends StatelessWidget {
113113
this.elevatedButton = false,
114114
this.tooltip,
115115
this.tooltipPadding,
116+
this.outlined = true,
116117
}) : assert((icon == null) != (imageIcon == null)),
117118
super(key: key);
118119

@@ -135,6 +136,8 @@ class IconLabelButton extends StatelessWidget {
135136

136137
final EdgeInsetsGeometry tooltipPadding;
137138

139+
final bool outlined;
140+
138141
@override
139142
Widget build(BuildContext context) {
140143
final iconLabel = MaterialIconLabel(
@@ -164,12 +167,17 @@ class IconLabelButton extends StatelessWidget {
164167
width: !includeText(context, minScreenWidthForTextBeforeScaling)
165168
? buttonMinWidth
166169
: null,
167-
child: OutlinedButton(
168-
style: denseAwareOutlinedButtonStyle(
169-
context, minScreenWidthForTextBeforeScaling),
170-
onPressed: onPressed,
171-
child: iconLabel,
172-
),
170+
child: outlined
171+
? OutlinedButton(
172+
style: denseAwareOutlinedButtonStyle(
173+
context, minScreenWidthForTextBeforeScaling),
174+
onPressed: onPressed,
175+
child: iconLabel,
176+
)
177+
: TextButton(
178+
onPressed: onPressed,
179+
child: iconLabel,
180+
),
173181
),
174182
);
175183
}

packages/devtools_app/lib/src/inspector/diagnostics.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class DiagnosticsNodeDescription extends StatelessWidget {
3535
const DiagnosticsNodeDescription(
3636
this.diagnostic, {
3737
this.isSelected,
38+
this.hasSearchMatch,
3839
this.errorText,
3940
this.multiline = false,
4041
this.style,
@@ -43,6 +44,7 @@ class DiagnosticsNodeDescription extends StatelessWidget {
4344

4445
final RemoteDiagnosticsNode diagnostic;
4546
final bool isSelected;
47+
final bool hasSearchMatch;
4648
final String errorText;
4749
final bool multiline;
4850
final TextStyle style;

0 commit comments

Comments
 (0)