mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 09:20:56 +01:00
Cleanup
This commit is contained in:
@@ -407,11 +407,11 @@ class NutritionPlansProvider with ChangeNotifier {
|
||||
};
|
||||
|
||||
if (isVegan) {
|
||||
query['is_vegan'] = 'True';
|
||||
query['is_vegan'] = 'true';
|
||||
}
|
||||
|
||||
if (isVegetarian) {
|
||||
query['is_vegetarian'] = 'True';
|
||||
query['is_vegetarian'] = 'true';
|
||||
}
|
||||
|
||||
// Send the request
|
||||
|
||||
@@ -83,8 +83,8 @@ class IngredientTypeahead extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _IngredientTypeaheadState extends State<IngredientTypeahead> {
|
||||
var _searchEnglish = true;
|
||||
late String barcode;
|
||||
var _searchEnglish = true;
|
||||
var _isVegan = false;
|
||||
var _isVegetarian = false;
|
||||
|
||||
@@ -243,7 +243,7 @@ class _IngredientTypeaheadState extends State<IngredientTypeahead> {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return StatefulBuilder(
|
||||
builder: (context, setState) {
|
||||
builder: (context, setDialogState) {
|
||||
return AlertDialog(
|
||||
title: Text(i18n.filter),
|
||||
content: Column(
|
||||
@@ -254,34 +254,28 @@ class _IngredientTypeaheadState extends State<IngredientTypeahead> {
|
||||
title: Text(i18n.searchNamesInEnglish),
|
||||
value: _searchEnglish,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
setDialogState(() {
|
||||
_searchEnglish = val;
|
||||
});
|
||||
this.setState(() {});
|
||||
},
|
||||
dense: true,
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(i18n.isVegan),
|
||||
value: _isVegan,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
setDialogState(() {
|
||||
_isVegan = val;
|
||||
});
|
||||
this.setState(() {});
|
||||
},
|
||||
dense: true,
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(i18n.isVegetarian),
|
||||
value: _isVegetarian,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
setDialogState(() {
|
||||
_isVegetarian = val;
|
||||
});
|
||||
this.setState(() {});
|
||||
},
|
||||
dense: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user