44> * showGeneralDialog:用于显示通用对话框的方法。与showDialog和showCupertinoDialog相比,showGeneralDialog提供了更高度的自定义能力,可以用于构建更灵活和复杂的对话框。
55> * AboutDialog:用于显示关于应用程序的对话框。通常,关于对话框用于显示应用程序的版本号、版权信息、开发者信息等。
66> * SimpleDialog:用于显示简单的对话框。通常用于在一组选项中让用户选择其中一个选项。
7- > * AlertDialog:用于显示一个警示对话框。
7+ > * AlertDialog:用于显示一个警示对话框。
88> * SimpleDialogOption:通常用于在一组选项中让用户选择其中一个选项,并且它是SimpleDialog的子部件。
9+ > * Dialog:一个通用的对话框类,并不限定对话框的具体内容和结构。它仅提供一个基本的容器,使你可以完全自定义对话框的内容、布局和样式。
910
10- ## showDialog类
11- ### 默认构造函数
11+ ## showDialog方法
12+ ### 函数原型
1213``` text
1314Future<T?> showDialog<T>({
1415 required BuildContext context,
@@ -38,8 +39,8 @@ Future<T?> showDialog<T>({
3839| anchorPoint | Offset | 对话框的锚点,这是一个相对于屏幕的偏移量,用于定位对话框的位置 |
3940| traversalEdgeBehavior | TraversalEdgeBehavior | 遍历边缘行为 |
4041
41- ## showCupertinoDialog类
42- ### 默认构造函数
42+ ## showCupertinoDialog方法
43+ ### 函数原型
4344``` text
4445Future<T?> showCupertinoDialog<T>({
4546 required BuildContext context,
@@ -63,8 +64,8 @@ Future<T?> showCupertinoDialog<T>({
6364| routeSettings | RouteSettings | 对话框的路由设置,可以用于传递一些路由相关的信息 |
6465| anchorPoint | Offset | 对话框的锚点,这是一个相对于屏幕的偏移量,用于定位对话框的位置 |
6566
66- ## showGeneralDialog类
67- ### 默认构造函数
67+ ## showGeneralDialog方法
68+ ### 函数原型
6869``` text
6970Future<T?> showGeneralDialog<T extends Object?>({
7071 required BuildContext context,
@@ -241,3 +242,59 @@ SimpleDialogOption({
241242| onPressed | Function | 点击选项时触发的回调函数 |
242243| padding | EdgeInsets | 选项的内边距 |
243244| child | Widget | 选项的内容 |
245+
246+ ## Dialog类
247+ ### 默认构造函数
248+ ``` text
249+ Dialog({
250+ super.key,
251+ this.backgroundColor,
252+ this.elevation,
253+ this.shadowColor,
254+ this.surfaceTintColor,
255+ this.insetAnimationDuration = const Duration(milliseconds: 100),
256+ this.insetAnimationCurve = Curves.decelerate,
257+ this.insetPadding,
258+ this.clipBehavior,
259+ this.shape,
260+ this.alignment,
261+ this.child,
262+ })
263+ ```
264+
265+ ### Dialog(...)参数解析
266+ | 参数名称 | 使用类型 | 参数介绍 |
267+ | ------------------------| --------------------| --------------------------------|
268+ | key | Key | 小部件的唯一标识符,可以用于查找和操作小部件 |
269+ | backgroundColor | Color | 对话框的背景颜色 |
270+ | elevation | double | 阴影高度,控制对话框的阴影深度,给人一种悬浮的效果 |
271+ | shadowColor | Color | 阴影的颜色 |
272+ | surfaceTintColor | Color | 表面着色颜色,用于影响对话框的背景色 |
273+ | insetAnimationDuration | Duration | 插入动画的持续时间 |
274+ | insetAnimationCurve | Curve | 插入动画的曲线,定义动画的速度变化 |
275+ | insetPadding | EdgeInsets | 控制对话框与屏幕边缘之间的内边距 |
276+ | clipBehavior | Clip | 裁剪行为,控制对话框内容超出边界时的裁剪方式。可以设置为 |
277+ | shape | ShapeBorder | 控制对话框的形状,通常用于设置对话框的圆角或自定义边框 |
278+ | alignment | AlignmentGeometry | 对话框在屏幕中的对齐方式,默认是居中对齐 |
279+ | child | Widget | 对话框的子组件,即其实际内容 |
280+
281+ ## Dialog类
282+ ### 创建全屏对话框
283+ ``` text
284+ Dialog.fullscreen({
285+ super.key,
286+ this.backgroundColor,
287+ this.insetAnimationDuration = Duration.zero,
288+ this.insetAnimationCurve = Curves.decelerate,
289+ this.child,
290+ })
291+ ```
292+
293+ ### Dialog(...)参数解析
294+ | 参数名称 | 使用类型 | 参数介绍 |
295+ | ------------------------| --------------------| --------------------------------|
296+ | key | Key | 小部件的唯一标识符,可以用于查找和操作小部件 |
297+ | backgroundColor | Color | 对话框的背景颜色 |
298+ | insetAnimationDuration | Duration | 插入动画的持续时间 |
299+ | insetAnimationCurve | Curve | 插入动画的曲线,定义动画的速度变化 |
300+ | child | Widget | 对话框的子组件,即其实际内容 |
0 commit comments