forked from eatvio/eatvio_app
fixed likes and favourite sync and adeded filter leayoutfor diets
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user