Skip to content

Fix diagnostics tree #17

@bdlukaa

Description

@bdlukaa

The following error is thrown when I try to open the devtools on the example app.

══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
The following _TypeError was thrown during a service extension callback for
"ext.flutter.inspector.getRootWidgetSummaryTree":
type 'Null' is not a subtype of type 'String' of 'function result'

When the exception was thrown, this was the stack:
#0      _Location.file (package:flutter/src/widgets/widget_inspector.dart)
#1      _Location.toJsonMap (package:flutter/src/widgets/widget_inspector.dart:2842:15)
#2      _Location.toJsonMap.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:2851:44)
#3      MappedListIterable.elementAt (dart:_internal/iterable.dart:411:31)
#4      ListIterator.moveNext (dart:_internal/iterable.dart:340:26)
#5      new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:188:27)
#6      new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#7      new List.of (dart:core-patch/array_patch.dart:50:28)
#8      ListIterable.toList (dart:_internal/iterable.dart:211:44)
#9      _Location.toJsonMap (package:flutter/src/widgets/widget_inspector.dart:2851:57)
#10     InspectorSerializationDelegate.additionalNodeProperties (package:flutter/src/widgets/widget_inspector.dart:3166:53)
#11     DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1592:21)
#12     DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1607:6)
#13     _ElementDiagnosticableTreeNode.toJsonMap (package:flutter/src/widgets/framework.dart:4219:45)
#14     WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1499:18)
#15     WidgetInspectorService._getRootWidgetSummaryTree (package:flutter/src/widgets/widget_inspector.dart:1683:12)
#16     WidgetInspectorService._registerObjectGroupServiceExtension.<anonymous closure>
(package:flutter/src/widgets/widget_inspector.dart:793:58)
#17     WidgetInspectorService._registerObjectGroupServiceExtension.<anonymous closure>
(package:flutter/src/widgets/widget_inspector.dart:792:17)
#18     BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:597:32)
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════════════════════════

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions