import '../../../../../../food_delivery_client.dart';

class WTodayOffers extends StatelessWidget {
  const WTodayOffers({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        12.verticalSpace,
        WSeeAllRaw(
          title: "Today's offers",
          onPressed: () {},
        ),
        10.verticalSpace,
        CarouselSlider.builder(
          options: CarouselOptions(
            height: 180.0,
            reverse: false,
            viewportFraction: 0.9,
            animateToClosest: true,
            autoPlay: true,
            autoPlayCurve: Curves.easeIn,
            initialPage: 0,
            padEnds: false,
            enableInfiniteScroll: true,
            scrollPhysics: const AlwaysScrollableScrollPhysics(),
            scrollDirection: Axis.horizontal,
          ),
          itemCount: 5,
          itemBuilder: (context, index, realIndex) {
            return Builder(
              builder: (BuildContext context) {
                return WFoodItem(
                  imageHeight: 130,
                  enableTag: true,
                  textStyle1: AppTextStyles.size14Medium,
                  textStyle2: AppTextStyles.size12Regular,
                );
              },
            );
          },
        ),
        10.verticalSpace,
        WDivider(),
        10.verticalSpace,
        ListView.separated(
          shrinkWrap: true,
          physics: const NeverScrollableScrollPhysics(),
          keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
          scrollDirection: Axis.vertical,
          itemBuilder: (context, index) => WFoodItem(),
          separatorBuilder: (context, index) => 25.verticalSpace,
          itemCount: 3,
        ),
        25.verticalSpace,
        WDivider()




      ],
    );
  }
}
