Add visual density to the gallery options#46090
Conversation
4750857 to
15518c5
Compare
There was a problem hiding this comment.
Is there a way to particularly target this instance of Text('System Default') here and elsewhere? I was thinking something like:
find.descendant(
of: find.byType(PopupMenu),
matching: find.text('System Default')
)
However, it seems both _PopupMenu and the _VisualDensityItem widgets are private, so I'm not sure if it's possible, but that would improve the process of updating these tests and prevent future bugs/confusion
There was a problem hiding this comment.
It's possible, it looks like this:
find.descendant(
of: find.byWidgetPredicate((Widget widget) => widget.runtimeType.toString() == '_PopupMenu'),
matching: find.text('System Default')
)I switched to something like this, but I used 'PopupMenuItem' because the byType finder can't find specialized generics.
There was a problem hiding this comment.
That's pretty neat, I'll definitely keep this in mind when I need it in the future!
15518c5 to
314dcc5
Compare
|
I think this is ready for another look. |
|
This PR failed the analyzer on linux: |
|
@flar why wasn't this reverted in the end? Just curious since seems like it might have introduced some performance regressions so not sure if it might be related. |
|
@franciscojma86 |
|
I see, thanks! |
This reverts commit 924efae.
)"... (flutter#47702)" This reverts commit e46671f.
I'm just seeing some performance regressions from around this time so you may be right, but they are subtle enough and the benchmarks themselves are noisy enough that it is hard to point at a specific commit that could have been the cause. |
Revert "Add visual density to the gallery options (flutter#46090)"
Description
This PR adds an option to the gallery options that sets the visual density to one of "standard" (the default), "comfortable", or "compact".
Tests
Breaking Change