forked from eatvio/eatvio_app
plans filters ready
This commit is contained in:
@@ -23,7 +23,6 @@ class _DietTypeChoiceWidgetState extends State<DietTypeChoiceWidget> {
|
||||
super.didChangeDependencies();
|
||||
final s = S.of(context);
|
||||
if (choiceContent.isEmpty) {
|
||||
|
||||
choiceContent.add(
|
||||
(
|
||||
'assets/icons/broccoli.svg',
|
||||
@@ -41,7 +40,7 @@ class _DietTypeChoiceWidgetState extends State<DietTypeChoiceWidget> {
|
||||
'assets/icons/bread.svg',
|
||||
s.carb_type,
|
||||
),
|
||||
);
|
||||
);
|
||||
choiceContent.add(
|
||||
(
|
||||
'assets/icons/meat2.svg',
|
||||
@@ -61,7 +60,7 @@ class _DietTypeChoiceWidgetState extends State<DietTypeChoiceWidget> {
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
final key = typeValues[index];
|
||||
final key = dietTypeValues[index];
|
||||
final value = !(state.dietData.type[key] ?? true);
|
||||
context.read<CreateDietCubit>().setDietType(key: key, value: value);
|
||||
},
|
||||
@@ -69,10 +68,10 @@ class _DietTypeChoiceWidgetState extends State<DietTypeChoiceWidget> {
|
||||
margin: EdgeInsets.only(right: index == 3 ? 0 : 4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
color: state.dietData.type[typeValues[index]] == true ? appTheme.cardBackground : appTheme.whiteA700,
|
||||
color: state.dietData.type[dietTypeValues[index]] == true ? appTheme.cardBackground : appTheme.whiteA700,
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: state.dietData.type[typeValues[index]] == true ? appTheme.blueA400 : appTheme.lightGray00,
|
||||
color: state.dietData.type[dietTypeValues[index]] == true ? appTheme.blueA400 : appTheme.lightGray00,
|
||||
),
|
||||
),
|
||||
height: 80,
|
||||
|
||||
Reference in New Issue
Block a user