makeInvoice static method
dynamic
makeInvoice({
- RequestInvoiceArgs? requestInvoiceArgs,
With makeInvoice the user creates an invoice to be used by the web app as:
final invoice = FlutterWebln.requestInvoiceArgs(
amount: 100,
defaultMemo: 'Hello World',
);
try {
await FlutterWebln.makeInvoice(requestInvoiceArgs: invoice)
.then(allowInterop((result) {
print('[+] RequestInvoiceResponse: ${weblnDecode(result)}');
}));
} catch (error) {
print('[!] Error in makeInvoice method is $error');
}
Implementation
static makeInvoice({RequestInvoiceArgs? requestInvoiceArgs}) =>
WeblnApi.makeInvoice(requestInvoiceArgs);