tryDelete method
void
tryDelete({})
Implementation
void tryDelete(
{required String title,
required String message,
required String ok,
required String cancel,
required Future<Result<int, String, IBaseObject?>> Function() future,
bool hasToPop = true}) async {
DI.app().openAlertDialog(context, title, message, ok, cancel,
(p0, context) async {
if (p0) {
await elaborateResult(future, hasToPop: false);
if (hasToPop) Navigator.of(context).pop();
} else {
if (hasToPop) Navigator.of(context).pop();
}
});
}