make the heap data table the default view#2058
Conversation
|
|
||
| ValueListenable<bool> get showHeatMap => _showHeatMap; | ||
|
|
||
| void toggleShowHeatMap(bool value) { |
There was a problem hiding this comment.
why not just expose showHeatMap as a ValueNotifier if we are fine with users reading and writing the value?
There was a problem hiding this comment.
We could do; this pattern does map a little closer to how we do it on other controllers. I don't have a strong opinion -
| const Text('Heat Map'), | ||
| Switch( | ||
| value: controller.showHeatMap, | ||
| value: controller.showHeatMap.value, |
There was a problem hiding this comment.
I'm not seeing where we are listening for changes to controller.showHeatMap to update this UI.
There was a problem hiding this comment.
We're not; this page generally just calls setState() for most changes and rebuilds the page. We may want to increase the granularity of the changes were listening to here. This PR really just changes the default Switch value w/o making a lot of other changes to the existing code.
This PR has a few UI related changes, but the main change is that it changes the default view for the heap snapshot from the heat map to the heap data table.
cc @terrylucas