void _save(
Transaction transactionCreated,
String password,
BuildContext context,
) async {
final Transaction? transaction =
await _webclient.save(transactionCreated, password).catchError((e) {
showDialog(
context: context,
builder: (contextDialog) {
return FailureDialog(e.message);
});
}, test: (e) => e is Exception);
if (transaction != null) {
await showDialog(
context: context,
builder: (contextDialog) {
return SuccessDialog('successful transaction');
});
Navigator.pop(context);
}
}
}