proceed3 function

Future<bool?> proceed3(
  1. BuildContext context,
  2. String title,
  3. String content
)

Implementation

Future<bool?> proceed3(BuildContext context, String title, String content) {
  return showDialog(
    context: context,
    builder: (context) {
      return AlertDialog(
        title: Text(title),
        content: Text(content),
        actions: [
          TextButton(
            onPressed: () {
              Navigator.pop(context, "No");
            },
            child: const Text("No"),
          ),
          TextButton(
            onPressed: () {
              Navigator.pop(context, "Yes");
            },
            child: const Text("Yes"),
          ),
        ],
      );
    },
  ).then(
    (value) => value == "Yes"
        ? true
        : value == "No"
            ? false
            : null,
  );
}