Feature(#630): Show brand for ingredients#1203
Conversation
| ), | ||
| title: Text( | ||
| ingredient.name, | ||
| title: Text.rich( |
There was a problem hiding this comment.
Is there a reason you added this in the title? Unless it breaks the UI (which I didn't test), I'd vote to simply show the brand in subtitle
Nevermind, we already have a subtitle
There was a problem hiding this comment.
haha yeah, I saw the subtitle is used for the chips/tags, and I thought a while about what the best design choice is of where to put the brand, but adding it to the subtitle felt too crowded and also mismatched with the chips, and I didn't want to add a 'third' row as it would just increase the per-item space too much. Since most items tend to have a short(er) name, I think name and brand sharing the title space looked okay. I'm open to suggestions though!
There was a problem hiding this comment.
no, you are right, the name and the brand belong more together.
If you want to fix a small thing, instead of changing the alpha here, use the color from one of the Theme.of(context).colorScheme.xyz (I think onSurfaceVariant?), then this also automatically works on the dark mode
There was a problem hiding this comment.
Good point! I fixed it with the latest commit. I decided to still modify the alpha channel a little in the ListTile title, because otherwise I felt like there was too little contrast between the ingredient name and the brand (since they are sharing a line). For the IngredientDetails view, I use onSurfaceVariant unmodified, since it's positioned in the line below and has smaller fontSize anyway.
|
Merged 🚀 |
Proposed Changes
As requested in #630, in the Nutrition UI, both the search results as well as the ingredient details show the
brandof the item (if provided by the API).This makes it easier to quickly distinguish between multiple ingredient items with the same name, and find the right item to track.
Related Issue(s)
Closes #630
Please check that the PR fulfills these requirements
dart format .)Screenshots