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

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

  @override
  Widget build(BuildContext context) {
    return BlocBuilder<BasketBloc, BasketState>(
      builder: (context, state) {
        return Expanded(
          child: RefreshIndicator(
            onRefresh: () async {
              context.read<BasketBloc>().add(BasketEvent.started());
              await Future.delayed(TimeDelayConst.duration3);
            },
            child: ListView.builder(
              shrinkWrap: true,
              itemCount: 10,
              scrollDirection: Axis.vertical,
              physics: const AlwaysScrollableScrollPhysics(),
              itemBuilder: (context, index) => OrderItem(),
            ),
          ),
        );
      },
    );
  }
}
