flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.56k stars 321 forks source link

Support BuiltValue in the inspector #3113

Open jacob314 opened 3 years ago

jacob314 commented 3 years ago

May applications particularly in g3 use BuiltValue heavily in their widget code. BuiltValue objects are not expandable which is confusing as they look a lot like Diagnosticable values that are.

The toString representation for Diagnosticable is lso slightly confusingly inconsistent with the one used by Flutter. Extend the Inspector and Debugger views in DevTools so that BuiltValue is always expandable.

Bonus: make BuiltValue editable by understanding the builder patters for built value.

Fyi @davidmorgan. One option would be to support BuiltValue types that extend Diagnosticable. Another option is to put the logical all in DevTools.

davidmorgan commented 3 years ago

Thanks Jacob. Relevant:

https://github.com/google/built_value.dart/issues/1048

--the issue is a bit terse; what it means is to properly support iterating over named fields, which would make implementing Diagnosticable straightforward.