yourWidget method

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

Implementation

@override
Widget yourWidget(BuildContext context, PayConfirmationModel? value) {
  if (parameters != null) {
    var orderNumber = parameters!['orderId'];
    if (orderNumber != null) {
      return BlocProvider<OrderComponentBloc>(
        create: (context) => OrderComponentBloc(
            orderRepository: orderRepository(appId: app.documentID))
          ..add(FetchOrderComponent(id: orderNumber as String?)),
        child: ConfirmationWidget(app, value),
      );
    } else {
      return alertWidget(title: 'error', content: 'Ordernumber not provided');
    }
  } else {
    return alertWidget(title: 'error', content: 'Ordernumber not provided');
  }
}