6 4 月 2026, 周一

Flutter Getx defaultDialog对话框组件

属性 类型 描述
title String 标题
titlePadding EdgeInsetsGeometry 标题内边距
onConfirm VoidCallback(Function()) 确认点击事件
onCancel VoidCallback (Function()) 取消 点击事件
onCustom VoidCallback (Function()) 自定义 点击事件
cancelTextColor Color 取消文本颜色
confirmTextColor Color 确认文字颜色
textConfirm String 确认 文本
textCancel String 取消 文本
textCustom String 自定义 文本
confirm Widget 确认
cancel Widget 取消
custom Widget 自定义
backgroundColor Color 背景颜色
barrierDismissible bool 障碍 可驳回
buttonColor Color 按钮颜色
middleText String 中间文本
middleTextStyle TextStyle 中间文本样式
radius double 半径
actions List<Widget> 行动 主题数据 themeData,
onWillPop WillPopCallback 在 Will Pop 上 onWillPop 范围
navigatorKey GlobalKey<NavigatorState> 导航键 用于推送对话框的导航器
titleStyle TextStyle 标题样式
content Widget 内容
contentPadding EdgeInsetsGeometry 内容填充
Avatar photo

sion932