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

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

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: ListView.builder(
        shrinkWrap: true,
        itemCount: 10,
        scrollDirection: Axis.vertical,
        physics: const NeverScrollableScrollPhysics(),
        itemBuilder: (context, index) =>
            Skeletonizer(enabled: true, child: OrderItemSkeletonizer()),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {},
      child: Ink(
        child: Column(
          children: [
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                ClipRRect(
                  borderRadius: AppUtils.kBorderRadius40,
                  child: CachedNetworkImage(
                    imageUrl: AppLocaleKeys.imageUrl,
                    height: 70,
                    width: 70,
                    fit: BoxFit.cover,
                  ),
                ),
                16.horizontalSpace,
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text("Begs & Megs", style: AppTextStyles.size16Medium),
                      Text(
                        AppLocaleKeys.lorem,
                        maxLines: 1,
                        overflow: TextOverflow.ellipsis,
                        style: AppTextStyles.size14Regular.copyWith(
                          color: AppColors.c6B6B6B,
                        ),
                      ),
                      Text(
                        "Deliver to San Franciscao Bay Area",
                        style: AppTextStyles.size14Regular.copyWith(
                          color: AppColors.c6B6B6B,
                        ),
                      ),
                    ],
                  ),
                ),
                Icon(
                  Icons.arrow_forward_ios_outlined,
                  color: AppColors.cFFFFFF,
                ),
              ],
            ).paddingSymmetric(vertical: 10, horizontal: 18),
            10.verticalSpace,
            WDivider(indent: 120, endIndent: 20, height: 1),
          ],
        ),
      ),
    );
  }
}
