@@ -46,11 +46,17 @@ class _DisplayProviderState extends State<DisplayProvider> {
4646 return InteractivityWrapper (
4747 onTap: widget.onTap,
4848 menuButtons: _getMenuButtons (context),
49- child: Text .rich (
50- TextSpan (
51- children: textSpansFromAnsi (
52- widget.variable.text! ,
53- theme.subtleFixedFontStyle,
49+ child: DevToolsTooltip (
50+ message: widget.variable.text,
51+ child: Text .rich (
52+ maxLines: 1 ,
53+ softWrap: false ,
54+ overflow: TextOverflow .ellipsis,
55+ TextSpan (
56+ children: textSpansFromAnsi (
57+ widget.variable.text! ,
58+ theme.subtleFixedFontStyle,
59+ ),
5460 ),
5561 ),
5662 ),
@@ -88,6 +94,7 @@ class _DisplayProviderState extends State<DisplayProvider> {
8894 Expanded (
8995 child: Text .rich (
9096 maxLines: 1 ,
97+ softWrap: false ,
9198 overflow: TextOverflow .ellipsis,
9299 TextSpan (
93100 text: hasName ? widget.variable.name : null ,
@@ -248,18 +255,27 @@ class DapDisplayProvider extends StatelessWidget {
248255 // TODO(https://github.com/flutter/devtools/issues/6056): Wrap in
249256 // interactivity wrapper to provide inspect and re-root functionality. Add
250257 // tooltip on hover to provide type information.
251- return Text .rich (
252- TextSpan (
253- text: name,
254- style: theme.fixedFontStyle.apply (
255- color: theme.colorScheme.controlFlowSyntaxColor,
258+ return DevToolsTooltip (
259+ message: value,
260+ child: Text .rich (
261+ maxLines: 1 ,
262+ softWrap: false ,
263+ overflow: TextOverflow .ellipsis,
264+ TextSpan (
265+ text: name,
266+ style: theme.fixedFontStyle.apply (
267+ color: theme.colorScheme.controlFlowSyntaxColor,
268+ ),
269+ children: [
270+ TextSpan (text: ': ' , style: theme.fixedFontStyle),
271+ // TODO(https://github.com/flutter/devtools/issues/6056): Change text
272+ // style based on variable type.
273+ TextSpan (
274+ text: value.replaceAll ('\n ' , '\\ n' ),
275+ style: theme.subtleFixedFontStyle,
276+ ),
277+ ],
256278 ),
257- children: [
258- TextSpan (text: ': ' , style: theme.fixedFontStyle),
259- // TODO(https://github.com/flutter/devtools/issues/6056): Change text
260- // style based on variable type.
261- TextSpan (text: value, style: theme.subtleFixedFontStyle),
262- ],
263279 ),
264280 );
265281 }
0 commit comments