plans filters ready

This commit is contained in:
Username1548
2024-12-16 20:31:23 +07:00
parent 067b10ed7f
commit 27241aebac
45 changed files with 1806 additions and 657 deletions

View File

@@ -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,