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

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

  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (context) => sl<HomeBloc>(),
      child: BlocBuilder<HomeBloc, HomeState>(
        builder: (context, state) {
          return WLayout(
            child: Scaffold(
              body: CustomScrollView(
                slivers: [
                  SliverToBoxAdapter(child: WHomeHeader()),
                  SliverToBoxAdapter(child: Column(children: [
                    WDeliveryHeader(),
                    WDiscountPart(),
                    WOffersCarouselSlider(),
                    WDiscountPart(),
                    WPopularNearYou(),
                    WTodayOffers(),
                    WPickItUpForFree()
                  ])),
                ],
              ),
            ),
          );
        },
      ),
    );
  }
}
