confirm function
Implementation
Future<bool> confirm(
BuildContext context, {
String? title,
String? message,
bool? isPositiveButtonVisible,
String? positiveActionTitle,
String? negativeActionTitle,
}) async {
var confirmedType = await showConfirmDialog(
context,
title: title,
body: message,
isPositiveButtonVisible: isPositiveButtonVisible,
positiveAction: positiveActionTitle,
negativeAction: negativeActionTitle,
);
return confirmedType == ConfirmTypes.approve;
}