|
1 | 1 | ## API |
2 | | -### TDImageDialog |
| 2 | +### TDAlertDialog |
3 | 3 | #### 默认构造方法 |
4 | 4 |
|
5 | 5 | | 参数 | 类型 | 默认值 | 说明 | |
6 | 6 | | --- | --- | --- | --- | |
7 | 7 | | key | | - | | |
8 | | -| image | Image | - | 图片 | |
9 | | -| imagePosition | TDDialogImagePosition? | TDDialogImagePosition.top | 图片位置 | |
10 | 8 | | backgroundColor | Color | Colors.white | 背景颜色 | |
11 | 9 | | radius | double | 12.0 | 圆角 | |
12 | 10 | | title | String? | - | 标题 | |
13 | 11 | | titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
14 | | -| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
15 | | -| contentWidget | Widget? | - | 内容Widget | |
16 | 12 | | content | String? | - | 内容 | |
17 | 13 | | contentColor | Color? | - | 内容颜色 | |
| 14 | +| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
| 15 | +| contentWidget | Widget? | - | 内容Widget | |
| 16 | +| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
18 | 17 | | leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
19 | 18 | | rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
| 19 | +| leftBtnAction | Function()? | - | 左侧按钮默认点击 | |
| 20 | +| rightBtnAction | Function()? | - | 右侧按钮默认点击 | |
20 | 21 | | showCloseButton | bool? | - | 显示右上角关闭按钮 | |
21 | | -| padding | EdgeInsets? | - | 内容内边距 | |
| 22 | +| buttonStyle | | TDDialogButtonStyle.normal | | |
| 23 | +| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
22 | 24 | | buttonWidget | Widget? | - | 自定义按钮 | |
23 | 25 |
|
24 | | -``` |
25 | | -``` |
26 | | - ### TDDialogButtonOptions |
27 | | -#### 默认构造方法 |
28 | 26 |
|
29 | | -| 参数 | 类型 | 默认值 | 说明 | |
30 | | -| --- | --- | --- | --- | |
31 | | -| title | String | - | 标题内容 | |
32 | | -| action | Function()? | - | 点击操作 | |
33 | | -| titleColor | Color? | - | 标题颜色 | |
34 | | -| titleSize | double? | - | 字体大小 | |
35 | | -| style | TDButtonStyle? | - | 按钮样式 | |
36 | | -| type | TDButtonType? | - | 按钮类型 | |
37 | | -| theme | TDButtonTheme? | - | 按钮类型 | |
38 | | -| height | double? | - | 按钮高度 | |
39 | | -| fontWeight | FontWeight? | - | 字体粗细 | |
| 27 | +#### 工厂构造方法 |
| 28 | + |
| 29 | +| 名称 | 说明 | |
| 30 | +| --- | --- | |
| 31 | +| TDAlertDialog.vertical | 纵向按钮排列的对话框 |
| 32 | + |
| 33 | + [buttons]参数是必须的,纵向按钮默认样式都是[TDButtonTheme.primary] | |
40 | 34 |
|
41 | 35 | ``` |
42 | 36 | ``` |
43 | | - ### TDConfirmDialog |
| 37 | + ### TDImageDialog |
44 | 38 | #### 默认构造方法 |
45 | 39 |
|
46 | 40 | | 参数 | 类型 | 默认值 | 说明 | |
47 | 41 | | --- | --- | --- | --- | |
48 | 42 | | key | | - | | |
49 | | -| action | Function()? | - | 点击 | |
| 43 | +| image | Image | - | 图片 | |
| 44 | +| imagePosition | TDDialogImagePosition? | TDDialogImagePosition.top | 图片位置 | |
50 | 45 | | backgroundColor | Color | Colors.white | 背景颜色 | |
51 | 46 | | radius | double | 12.0 | 圆角 | |
52 | 47 | | title | String? | - | 标题 | |
|
55 | 50 | | contentWidget | Widget? | - | 内容Widget | |
56 | 51 | | content | String? | - | 内容 | |
57 | 52 | | contentColor | Color? | - | 内容颜色 | |
58 | | -| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
59 | | -| buttonText | String? | - | 按钮文字 | |
60 | | -| buttonTextColor | Color? | - | 按钮文字颜色 | |
61 | | -| buttonStyle | TDDialogButtonStyle | TDDialogButtonStyle.normal | 按钮样式 | |
62 | | -| showCloseButton | bool? | - | 右上角关闭按钮 | |
63 | | -| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
| 53 | +| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
| 54 | +| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
| 55 | +| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
| 56 | +| padding | EdgeInsets? | - | 内容内边距 | |
64 | 57 | | buttonWidget | Widget? | - | 自定义按钮 | |
65 | 58 |
|
66 | 59 | ``` |
|
88 | 81 | | buttonWidget | Widget? | - | 自定义按钮 | |
89 | 82 | | customInputWidget | Widget? | - | 自定义输入框 | |
90 | 83 |
|
91 | | -``` |
92 | | -``` |
93 | | - ### TDAlertDialog |
94 | | -#### 默认构造方法 |
95 | | - |
96 | | -| 参数 | 类型 | 默认值 | 说明 | |
97 | | -| --- | --- | --- | --- | |
98 | | -| key | | - | | |
99 | | -| backgroundColor | Color | Colors.white | 背景颜色 | |
100 | | -| radius | double | 12.0 | 圆角 | |
101 | | -| title | String? | - | 标题 | |
102 | | -| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
103 | | -| content | String? | - | 内容 | |
104 | | -| contentColor | Color? | - | 内容颜色 | |
105 | | -| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
106 | | -| contentWidget | Widget? | - | 内容Widget | |
107 | | -| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
108 | | -| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
109 | | -| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
110 | | -| leftBtnAction | Function()? | - | 左侧按钮默认点击 | |
111 | | -| rightBtnAction | Function()? | - | 右侧按钮默认点击 | |
112 | | -| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
113 | | -| buttonStyle | | TDDialogButtonStyle.normal | | |
114 | | -| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
115 | | -| buttonWidget | Widget? | - | 自定义按钮 | |
116 | | - |
117 | | - |
118 | | -#### 工厂构造方法 |
119 | | - |
120 | | -| 名称 | 说明 | |
121 | | -| --- | --- | |
122 | | -| TDAlertDialog.vertical | 纵向按钮排列的对话框 |
123 | | - |
124 | | - [buttons]参数是必须的,纵向按钮默认样式都是[TDButtonTheme.primary] | |
125 | | - |
126 | 84 | ``` |
127 | 85 | ``` |
128 | 86 | ### TDDialogScaffold |
|
216 | 174 | | height | double? | 40.0 | 按钮高度 | |
217 | 175 | | width | double? | - | 按钮宽度 | |
218 | 176 | | isBlock | bool | true | 按钮高度 | |
| 177 | + |
| 178 | +``` |
| 179 | +``` |
| 180 | + ### TDConfirmDialog |
| 181 | +#### 默认构造方法 |
| 182 | + |
| 183 | +| 参数 | 类型 | 默认值 | 说明 | |
| 184 | +| --- | --- | --- | --- | |
| 185 | +| key | | - | | |
| 186 | +| action | Function()? | - | 点击 | |
| 187 | +| backgroundColor | Color | Colors.white | 背景颜色 | |
| 188 | +| radius | double | 12.0 | 圆角 | |
| 189 | +| title | String? | - | 标题 | |
| 190 | +| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
| 191 | +| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
| 192 | +| contentWidget | Widget? | - | 内容Widget | |
| 193 | +| content | String? | - | 内容 | |
| 194 | +| contentColor | Color? | - | 内容颜色 | |
| 195 | +| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
| 196 | +| buttonText | String? | - | 按钮文字 | |
| 197 | +| buttonTextColor | Color? | - | 按钮文字颜色 | |
| 198 | +| buttonStyle | TDDialogButtonStyle | TDDialogButtonStyle.normal | 按钮样式 | |
| 199 | +| showCloseButton | bool? | - | 右上角关闭按钮 | |
| 200 | +| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
| 201 | +| buttonWidget | Widget? | - | 自定义按钮 | |
| 202 | + |
| 203 | +``` |
| 204 | +``` |
| 205 | + ### TDDialogButtonOptions |
| 206 | +#### 默认构造方法 |
| 207 | + |
| 208 | +| 参数 | 类型 | 默认值 | 说明 | |
| 209 | +| --- | --- | --- | --- | |
| 210 | +| title | String | - | 标题内容 | |
| 211 | +| action | Function()? | - | 点击操作 | |
| 212 | +| titleColor | Color? | - | 标题颜色 | |
| 213 | +| titleSize | double? | - | 字体大小 | |
| 214 | +| style | TDButtonStyle? | - | 按钮样式 | |
| 215 | +| type | TDButtonType? | - | 按钮类型 | |
| 216 | +| theme | TDButtonTheme? | - | 按钮类型 | |
| 217 | +| height | double? | - | 按钮高度 | |
| 218 | +| fontWeight | FontWeight? | - | 字体粗细 | |
0 commit comments