yourWidget method
Implementation
@override
Widget yourWidget(BuildContext context, PayModel? value) {
if (value == null) return Text("pay is null");
var cartBloc = BlocProvider.of<CartBloc>(context);
var accessBloc = AccessBloc.getBloc(context);
return BlocProvider<PaymentBloc>(
create: (context) =>
PaymentBloc(app, cartBloc, accessBloc, value.succeeded)
..add(CollectOrder(value.shop)),
child:
BlocBuilder<PaymentBloc, PaymentState>(builder: (context, state) {
return _paymentWidget(context, value);
}));
}