confirm static method
Implementation
static Future<bool> confirm({String title = "확인", required String message}) async {
final result = await showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(title),
content: Text(message),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop(false);
},
child: const Text("취소"),
),
TextButton(
onPressed: () {
Navigator.of(context).pop(true);
},
child: const Text("확인"),
),
],
);
},
);
return result == true;
}