sendPayment static method

dynamic sendPayment({
  1. required String invoice,
})

With sendPayment the user sends a payment for an invoice. The user needs to provide a BOLT-11 invoice.

try {
  await FlutterWebln.sendPayment(invoice: invoiceController.text)
      .then(allowInterop((result) {
    print('[+] SendPaymentResponse: ${weblnDecode(result)}');
  }));
} catch (error) {
  print('[!] Error in sendPayment method is $error');
}

Implementation

static sendPayment({required String invoice}) =>
    WeblnApi.sendPayment(invoice);