From 7fbdc04289ca30796e6929b09316227389d7bfe7 Mon Sep 17 00:00:00 2001 From: GowthamGoush Date: Mon, 14 Mar 2022 12:15:50 +0530 Subject: [PATCH 1/2] feat: Add button to close questions --- .../smooth_app/lib/cards/product_cards/question_card.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/smooth_app/lib/cards/product_cards/question_card.dart b/packages/smooth_app/lib/cards/product_cards/question_card.dart index f3031ff695c..782ed63f49c 100644 --- a/packages/smooth_app/lib/cards/product_cards/question_card.dart +++ b/packages/smooth_app/lib/cards/product_cards/question_card.dart @@ -4,6 +4,7 @@ import 'package:openfoodfacts/openfoodfacts.dart'; import 'package:openfoodfacts/utils/OpenFoodAPIConfiguration.dart'; import 'package:smooth_app/cards/product_cards/product_image_carousel.dart'; import 'package:smooth_app/cards/product_cards/product_title_card.dart'; +import 'package:smooth_app/generic_lib/buttons/smooth_action_button.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/generic_lib/loading_dialog.dart'; import 'package:smooth_app/helpers/user_management_helper.dart'; @@ -379,6 +380,7 @@ class _QuestionCardState extends State child: Text( appLocalizations.sign_in_text, style: bodyTextStyle, + textAlign: TextAlign.center, ), ), ], @@ -387,6 +389,10 @@ class _QuestionCardState extends State return EMPTY_WIDGET; } }), + SmoothActionButton( + text: appLocalizations.close, + onPressed: () => Navigator.pop(context), + ) ], ), ); From 4a8a89aef111c374647abaecacca22241dd902a5 Mon Sep 17 00:00:00 2001 From: GowthamGoush Date: Wed, 16 Mar 2022 00:37:06 +0530 Subject: [PATCH 2/2] fix: Dart formatting issues --- .../smooth_app/lib/cards/product_cards/question_card.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/smooth_app/lib/cards/product_cards/question_card.dart b/packages/smooth_app/lib/cards/product_cards/question_card.dart index 782ed63f49c..b3b9b66eeb0 100644 --- a/packages/smooth_app/lib/cards/product_cards/question_card.dart +++ b/packages/smooth_app/lib/cards/product_cards/question_card.dart @@ -389,10 +389,10 @@ class _QuestionCardState extends State return EMPTY_WIDGET; } }), - SmoothActionButton( - text: appLocalizations.close, - onPressed: () => Navigator.pop(context), - ) + SmoothActionButton( + text: appLocalizations.close, + onPressed: () => Navigator.pop(context), + ), ], ), );