Skip to content

Commit

Permalink
fix: Personalize ranking top bar color (#1238)
Browse files Browse the repository at this point in the history
* chore(develop): release 0.2.0

* added dark theme on personalized page

* Certain Changes

* Reverted changelog changes

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marvin M <[email protected]>
  • Loading branch information
3 people authored Mar 18, 2022
1 parent 582ad3a commit 0cb2fbc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
* [#691](https://www.github.com/openfoodfacts/smooth-app/issues/691) - regenerated golden screenshots for profile with bottom bar ([#692](https://www.github.com/openfoodfacts/smooth-app/issues/692)) ([85970d9](https://www.github.com/openfoodfacts/smooth-app/commit/85970d92ae8b4c7d2d457c2566eec97996d4a90c))
* contributors dialog ([#641](https://www.github.com/openfoodfacts/smooth-app/issues/641)) ([b7b7983](https://www.github.com/openfoodfacts/smooth-app/commit/b7b798342559abfaab6824227fd1aea586023b9c))
* deprecated share package + analyzer warnings ([#656](https://www.github.com/openfoodfacts/smooth-app/issues/656)) ([61576de](https://www.github.com/openfoodfacts/smooth-app/commit/61576ded7128aa34b8ac5283532cced4872c8226))
* null crash in new product page with knowledge panels builder ([#675](https://www.github.com/openfoodfacts/smooth-app/issues/675)) ([76222ac](https://www.github.com/openfoodfacts/smooth-app/commit/76222ac7c106873ef233b42c82b823172305837a))
* null crash in new product page with knowledge panels builder ([#675](https://www.github.com/openfoodfacts/smooth-app/issues/675)) ([76222ac](https://www.github.com/openfoodfacts/smooth-app/commit/76222ac7c106873ef233b42c82b823172305837a))
15 changes: 11 additions & 4 deletions packages/smooth_app/lib/pages/personalized_ranking_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class _PersonalizedRankingPageState extends State<PersonalizedRankingPage> {
context.watch<ProductPreferences>();
final LocalDatabase localDatabase = context.watch<LocalDatabase>();
final DaoProductList daoProductList = DaoProductList(localDatabase);
final ThemeData themeData = Theme.of(context);
final ColorScheme colorScheme = themeData.colorScheme;
_model.refresh(
widget.products,
productPreferences,
Expand Down Expand Up @@ -88,8 +90,8 @@ class _PersonalizedRankingPageState extends State<PersonalizedRankingPage> {
initialIndex: _ORDERED_MATCH_TABS.indexOf(MatchTab.YES),
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
foregroundColor: Colors.black,
backgroundColor: colorScheme.background,
foregroundColor: colorScheme.onBackground,
bottom: TabBar(
unselectedLabelStyle: const TextStyle(
fontSize: 15,
Expand All @@ -111,7 +113,9 @@ class _PersonalizedRankingPageState extends State<PersonalizedRankingPage> {
(final int index) => Tab(
child: Text(
titles[index],
style: TextStyle(color: colors[index]),
style: index == 0
? TextStyle(color: themeData.hintColor)
: TextStyle(color: colors[index]),
),
),
),
Expand All @@ -121,7 +125,10 @@ class _PersonalizedRankingPageState extends State<PersonalizedRankingPage> {
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Flexible(
child: Text(widget.title, overflow: TextOverflow.fade),
child: Text(
widget.title,
overflow: TextOverflow.fade,
),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.2.0

0 comments on commit 0cb2fbc

Please sign in to comment.