Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/// Wrapper BLoC pour la page des cotisations
|
||||
library cotisations_page_wrapper;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:unionflow_mobile_apps/features/contributions/bloc/contributions_bloc.dart';
|
||||
import 'package:unionflow_mobile_apps/features/contributions/bloc/contributions_event.dart';
|
||||
import 'package:unionflow_mobile_apps/features/contributions/presentation/pages/contributions_page.dart';
|
||||
import 'package:unionflow_mobile_apps/features/members/bloc/membres_bloc.dart';
|
||||
|
||||
final _getIt = GetIt.instance;
|
||||
|
||||
/// Wrapper qui fournit les BLoCs à la page des cotisations (et au dialogue de création)
|
||||
class CotisationsPageWrapper extends StatelessWidget {
|
||||
const CotisationsPageWrapper({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider<ContributionsBloc>(
|
||||
create: (context) {
|
||||
final bloc = _getIt<ContributionsBloc>();
|
||||
bloc.add(const LoadContributions());
|
||||
return bloc;
|
||||
},
|
||||
),
|
||||
BlocProvider<MembresBloc>(
|
||||
create: (context) => _getIt<MembresBloc>(),
|
||||
),
|
||||
],
|
||||
child: const ContributionsPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Alias pour la route /finances et références anglaises
|
||||
class ContributionsPageWrapper extends StatelessWidget {
|
||||
const ContributionsPageWrapper({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => const CotisationsPageWrapper();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user