fixed likes and favourite sync and adeded filter leayoutfor diets

This commit is contained in:
Username1548
2024-11-15 19:07:15 +07:00
parent 64baf15cbd
commit 00da652860
24 changed files with 831 additions and 100 deletions

View File

@@ -0,0 +1,32 @@
import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/material.dart';
class ChoiceChipWidget extends StatelessWidget {
const ChoiceChipWidget({super.key, required this.chipsLabelList, required this.index, required this.selectedChipIndex, required this.onSelected});
final List<String> chipsLabelList;
final int index;
final int selectedChipIndex;
final void Function(bool) onSelected;
@override
Widget build(BuildContext context) {
return ChoiceChip(
selectedColor: appTheme.blueA400,
pressElevation: 0,
showCheckmark: false,
side: BorderSide.none,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
label: Text(chipsLabelList[index]),
labelStyle: TextStyle(
color: index == selectedChipIndex ? Colors.white : appTheme.gray600,
fontWeight: FontWeight.w500,
fontSize: 12,
),
selected: selectedChipIndex == index,
backgroundColor: appTheme.gray100,
onSelected: onSelected,
);
}
}