Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Personalize ranking top bar color #1238

Merged
merged 4 commits into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
google_ml_barcode_scanner:
google_ml_kit:
dependency: "direct main"
description:
name: google_ml_barcode_scanner
name: google_ml_kit
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2"
version: "0.6.0"
hive:
dependency: "direct main"
description:
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