import 'package:flutter/cupertino.dart'; import 'package:get/get.dart'; class ShowIosTipView extends StatelessWidget { ShowIosTipView( {Key? key, this.title, this.tipTitle, this.sureClick, this.cancelClick}) : super(key: key); String? title; String? tipTitle; Function()? sureClick; Function()? cancelClick; @override Widget build(BuildContext context) { return CupertinoAlertDialog( title: Text(title!), content: Text(tipTitle!), actions: [ CupertinoDialogAction( child: Text('取消'.tr), onPressed: () { if (cancelClick != null) { cancelClick!(); } }, ), CupertinoDialogAction( child: Text('确定'.tr), onPressed: () { if (sureClick != null) { sureClick!(); } }, ), ], ); } }