Merge pull request 'new test cases' (#218) from misha/eatvio_app:main into main

Reviewed-on: eatvio/eatvio_app#218
This commit is contained in:
BLoC
2025-01-29 11:35:18 +00:00
38 changed files with 897 additions and 460 deletions

View File

@@ -0,0 +1,44 @@
import 'package:eatvio_app/features/feed/presentation/widgets/choice_chip_widget.dart';
import 'package:flutter/widgets.dart';
class ChipGroup extends StatelessWidget {
const ChipGroup({
super.key,
required this.selectedChipIndex,
required this.chipsLabelList,
required this.setSelectedChipIndex,
});
final int selectedChipIndex;
final List<String> chipsLabelList;
final void Function(int) setSelectedChipIndex;
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.centerLeft,
child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 16),
scrollDirection: Axis.horizontal,
child: Row(
children: [
...List.generate(
5,
(index) => Padding(
padding: EdgeInsets.only(right: 8.0),
child: ChoiceChipWidget(
index: index,
selectedChipIndex: selectedChipIndex,
chipsLabelList: chipsLabelList,
onSelected: (bool selected) {
setSelectedChipIndex(index);
FocusScope.of(context).requestFocus(new FocusNode());
},
),
),
),
],
),
),
);
}
}