Skip to content

Commit

Permalink
Pass the language/country to the method to reset the password (#4520)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Aug 14, 2023
1 parent b719fcc commit d59eee1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:openfoodfacts/openfoodfacts.dart';
import 'package:smooth_app/generic_lib/design_constants.dart';
import 'package:smooth_app/generic_lib/widgets/smooth_card.dart';
import 'package:smooth_app/generic_lib/widgets/smooth_text_form_field.dart';
import 'package:smooth_app/query/product_query.dart';
import 'package:smooth_app/widgets/smooth_app_bar.dart';
import 'package:smooth_app/widgets/smooth_scaffold.dart';

Expand Down Expand Up @@ -33,7 +34,11 @@ class _ForgotPasswordPageState extends State<ForgotPasswordPage>

Status? status;
try {
status = await OpenFoodAPIClient.resetPassword(_userIdController.text);
status = await OpenFoodAPIClient.resetPassword(
_userIdController.text,
country: ProductQuery.getCountry(),
language: ProductQuery.getLanguage(),
);
} catch (e) {
status = null;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,10 @@ packages:
dependency: "direct main"
description:
name: openfoodfacts
sha256: "4c3e095a20bca11006c957ec37d83fda1178dc03bde0254d4cc29d0eb09ebb3b"
sha256: "25d4906abb23c8f2667f3b97e5c787b7d3e02082456da7a82fad38518c04489a"
url: "https://pub.dev"
source: hosted
version: "2.8.0"
version: "2.10.0"
openfoodfacts_flutter_lints:
dependency: "direct dev"
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ dependencies:



openfoodfacts: 2.9.0
openfoodfacts: 2.10.0
# openfoodfacts:
# path: ../../../openfoodfacts-dart

Expand Down

0 comments on commit d59eee1

Please sign in to comment.