MethodChannelStonePayments constructor

MethodChannelStonePayments()

Constructor and method channel initialization

Implementation

MethodChannelStonePayments() {
  methodChannel.setMethodCallHandler((call) async {
    switch (call.method) {
      case 'message':
        _paymentController
            .add(StatusTransactionEnum.fromName(call.arguments));
        break;
      case 'pixQrCode':
        _currentOnPixQrCode?.call(call.arguments);
        break;
      default:
        _paymentController.add(call.arguments);
        break;
    }
  });
}