yourWidget method

  1. @override
Widget yourWidget(
  1. BuildContext context,
  2. PayModel? value
)
override

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);
      }));
}