/// Wrapper BLoC pour la page des demandes d'aide
library demandes_aide_page_wrapper;

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:get_it/get_it.dart';
import '../../bloc/solidarity_bloc.dart';
import 'demandes_aide_page.dart';

final _getIt = GetIt.instance;

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

  @override
  Widget build(BuildContext context) {
    return BlocProvider<SolidarityBloc>(
      create: (context) {
        final bloc = _getIt<SolidarityBloc>();
        bloc.add(const LoadDemandesAide());
        return bloc;
      },
      child: const DemandesAidePage(),
    );
  }
}
