class TipDialog extends Dialog {
final String? content;
final String? title;
final void Function()? fn1;
/// 确认按钮文字
final String fn2Text;
/// 回调函数
final void Function()? fn2;
/// 按钮文字
final String fn1Text;
final double height;
final String? subTitle;
TipDialog({
Key? key,
this.content = '',
this.title,
this.height = 300.0,
this.fn2Text = "取消",
this.fn1Text = "确定",
this.fn1,
this.subTitle,
this.fn2,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Material(
type: MaterialType.transparency,
child: Center(
child: Container(
height: height.w,
constraints: BoxConstraints(
maxWidth: ScreenUtil.getScreenW(context) - 104,
maxHeight: ScreenUtil.getScreenW(context),
minHeight: height.w),
margin: MediaQuery.of(context).viewInsets +
const EdgeInse
flutter 仿制苹果弹窗
最新推荐文章于 2025-03-10 20:53:16 发布