Skip to content

Commit

Permalink
fix: A clear alert message after changing preference. (#1783)
Browse files Browse the repository at this point in the history
* fix: A clear and logical alert message

* passed arguments to arb file

* modified description text
  • Loading branch information
bhattabhi013 authored May 11, 2022
1 parent ca1fa29 commit 74ab981
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1166,5 +1166,17 @@
"confirm_clear": "Do you really want to clear?",
"@confirm_clear": {
"description": "Asking about whether to clear the list or not"
},
"importance_label": "{name} importance: {id}",
"@importance_label": {
"description": "Used when user selects a food preference. example: Vegan importance; mandatory",
"placeholders": {
"name": {
"type": "String"
},
"id": {
"type": "String"
}
}
}
}
6 changes: 4 additions & 2 deletions packages/smooth_app/lib/widgets/attribute_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ class AttributeButton extends StatelessWidget {
context: context,
builder: (BuildContext context) => SmoothAlertDialog(
body: Text(
'blah blah blah importance "$importanceId"'), // TODO(monsieurtanuki): find translations
appLocalizations!.importance_label(
attribute.name.toString(), importanceId),
),
actions: <SmoothActionButton>[
SmoothActionButton(
text: appLocalizations!.close,
text: appLocalizations.close,
onPressed: () => Navigator.pop(context),
),
],
Expand Down

0 comments on commit 74ab981

Please sign in to comment.