showConfirmDialog static method
void
showConfirmDialog({
- required String middleText,
- VoidCallback? onConfirm,
- VoidCallback? onCancel,
Implementation
static void showConfirmDialog({required String middleText,VoidCallback? onConfirm,VoidCallback? onCancel}){
Get.defaultDialog(
title: '提示',
titleStyle: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold
),
radius: 12,
backgroundColor: Colors.white,
middleText: middleText,
textCancel: '取消',
confirmTextColor: Colors.white,
textConfirm: '确定',
onConfirm: (){
onConfirm?.call();
Get.back();
},
onCancel: (){
onCancel?.call();
}
);
}