|
1 | 1 | ## API |
2 | | -### TDImageDialog |
3 | | -#### 默认构造方法 |
4 | | - |
5 | | -| 参数 | 类型 | 默认值 | 说明 | |
6 | | -| --- | --- | --- | --- | |
7 | | -| key | | - | | |
8 | | -| image | Image | - | 图片 | |
9 | | -| imagePosition | TDDialogImagePosition? | TDDialogImagePosition.top | 图片位置 | |
10 | | -| backgroundColor | Color | Colors.white | 背景颜色 | |
11 | | -| radius | double | 12.0 | 圆角 | |
12 | | -| title | String? | - | 标题 | |
13 | | -| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
14 | | -| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
15 | | -| contentWidget | Widget? | - | 内容Widget | |
16 | | -| content | String? | - | 内容 | |
17 | | -| contentColor | Color? | - | 内容颜色 | |
18 | | -| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
19 | | -| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
20 | | -| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
21 | | -| padding | EdgeInsets? | - | 内容内边距 | |
22 | | -| buttonWidget | Widget? | - | 自定义按钮 | |
23 | | - |
24 | | -``` |
25 | | -``` |
26 | | - ### TDAlertDialog |
27 | | -#### 默认构造方法 |
28 | | - |
29 | | -| 参数 | 类型 | 默认值 | 说明 | |
30 | | -| --- | --- | --- | --- | |
31 | | -| key | | - | | |
32 | | -| backgroundColor | Color | Colors.white | 背景颜色 | |
33 | | -| radius | double | 12.0 | 圆角 | |
34 | | -| title | String? | - | 标题 | |
35 | | -| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
36 | | -| content | String? | - | 内容 | |
37 | | -| contentColor | Color? | - | 内容颜色 | |
38 | | -| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
39 | | -| contentWidget | Widget? | - | 内容Widget | |
40 | | -| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
41 | | -| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
42 | | -| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
43 | | -| leftBtnAction | Function()? | - | 左侧按钮默认点击 | |
44 | | -| rightBtnAction | Function()? | - | 右侧按钮默认点击 | |
45 | | -| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
46 | | -| buttonStyle | | TDDialogButtonStyle.normal | | |
47 | | -| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
48 | | -| buttonWidget | Widget? | - | 自定义按钮 | |
49 | | - |
50 | | - |
51 | | -#### 工厂构造方法 |
52 | | - |
53 | | -| 名称 | 说明 | |
54 | | -| --- | --- | |
55 | | -| TDAlertDialog.vertical | 纵向按钮排列的对话框 |
56 | | - |
57 | | - [buttons]参数是必须的,纵向按钮默认样式都是[TDButtonTheme.primary] | |
58 | | - |
59 | | -``` |
60 | | -``` |
61 | | - ### TDConfirmDialog |
62 | | -#### 默认构造方法 |
63 | | - |
64 | | -| 参数 | 类型 | 默认值 | 说明 | |
65 | | -| --- | --- | --- | --- | |
66 | | -| key | | - | | |
67 | | -| action | Function()? | - | 点击 | |
68 | | -| backgroundColor | Color | Colors.white | 背景颜色 | |
69 | | -| radius | double | 12.0 | 圆角 | |
70 | | -| title | String? | - | 标题 | |
71 | | -| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
72 | | -| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
73 | | -| contentWidget | Widget? | - | 内容Widget | |
74 | | -| content | String? | - | 内容 | |
75 | | -| contentColor | Color? | - | 内容颜色 | |
76 | | -| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
77 | | -| buttonText | String? | - | 按钮文字 | |
78 | | -| buttonTextColor | Color? | - | 按钮文字颜色 | |
79 | | -| buttonStyle | TDDialogButtonStyle | TDDialogButtonStyle.normal | 按钮样式 | |
80 | | -| showCloseButton | bool? | - | 右上角关闭按钮 | |
81 | | -| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
82 | | -| buttonWidget | Widget? | - | 自定义按钮 | |
83 | | - |
84 | | -``` |
85 | | -``` |
86 | | - ### TDDialogScaffold |
| 2 | +### TDDialogScaffold |
87 | 3 | #### 默认构造方法 |
88 | 4 |
|
89 | 5 | | 参数 | 类型 | 默认值 | 说明 | |
|
92 | 8 | | body | Widget | - | Dialog主体 | |
93 | 9 | | showCloseButton | bool? | - | 显示右上角关闭按钮 | |
94 | 10 | | backgroundColor | Color | Colors.white | 背景色 | |
| 11 | +| width | double? | - | 弹窗宽度 | |
95 | 12 | | radius | double | 12.0 | 圆角 | |
96 | 13 |
|
97 | 14 | ``` |
|
177 | 94 |
|
178 | 95 | ``` |
179 | 96 | ``` |
180 | | - ### TDDialogButtonOptions |
| 97 | + ### TDAlertDialog |
181 | 98 | #### 默认构造方法 |
182 | 99 |
|
183 | 100 | | 参数 | 类型 | 默认值 | 说明 | |
184 | 101 | | --- | --- | --- | --- | |
185 | | -| title | String | - | 标题内容 | |
186 | | -| action | Function()? | - | 点击操作 | |
187 | | -| titleColor | Color? | - | 标题颜色 | |
188 | | -| titleSize | double? | - | 字体大小 | |
189 | | -| style | TDButtonStyle? | - | 按钮样式 | |
190 | | -| type | TDButtonType? | - | 按钮类型 | |
191 | | -| theme | TDButtonTheme? | - | 按钮类型 | |
192 | | -| height | double? | - | 按钮高度 | |
193 | | -| fontWeight | FontWeight? | - | 字体粗细 | |
| 102 | +| key | | - | | |
| 103 | +| backgroundColor | Color | Colors.white | 背景颜色 | |
| 104 | +| radius | double | 12.0 | 圆角 | |
| 105 | +| title | String? | - | 标题 | |
| 106 | +| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
| 107 | +| content | String? | - | 内容 | |
| 108 | +| contentColor | Color? | - | 内容颜色 | |
| 109 | +| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
| 110 | +| contentWidget | Widget? | - | 内容Widget | |
| 111 | +| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
| 112 | +| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
| 113 | +| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
| 114 | +| leftBtnAction | Function()? | - | 左侧按钮默认点击 | |
| 115 | +| rightBtnAction | Function()? | - | 右侧按钮默认点击 | |
| 116 | +| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
| 117 | +| buttonStyle | | TDDialogButtonStyle.normal | | |
| 118 | +| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
| 119 | +| buttonWidget | Widget? | - | 自定义按钮 | |
| 120 | + |
| 121 | + |
| 122 | +#### 工厂构造方法 |
| 123 | + |
| 124 | +| 名称 | 说明 | |
| 125 | +| --- | --- | |
| 126 | +| TDAlertDialog.vertical | 纵向按钮排列的对话框 |
| 127 | + |
| 128 | + [buttons]参数是必须的,纵向按钮默认样式都是[TDButtonTheme.primary] | |
| 129 | + |
| 130 | +``` |
| 131 | +``` |
| 132 | + ### TDConfirmDialog |
| 133 | +#### 默认构造方法 |
| 134 | + |
| 135 | +| 参数 | 类型 | 默认值 | 说明 | |
| 136 | +| --- | --- | --- | --- | |
| 137 | +| key | | - | | |
| 138 | +| action | Function()? | - | 点击 | |
| 139 | +| backgroundColor | Color | Colors.white | 背景颜色 | |
| 140 | +| radius | double | 12.0 | 圆角 | |
| 141 | +| title | String? | - | 标题 | |
| 142 | +| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
| 143 | +| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
| 144 | +| contentWidget | Widget? | - | 内容Widget | |
| 145 | +| content | String? | - | 内容 | |
| 146 | +| contentColor | Color? | - | 内容颜色 | |
| 147 | +| contentMaxHeight | double | 0 | 内容的最大高度,默认为0,也就是不限制高度 | |
| 148 | +| buttonText | String? | - | 按钮文字 | |
| 149 | +| buttonTextColor | Color? | - | 按钮文字颜色 | |
| 150 | +| buttonStyle | TDDialogButtonStyle | TDDialogButtonStyle.normal | 按钮样式 | |
| 151 | +| showCloseButton | bool? | - | 右上角关闭按钮 | |
| 152 | +| padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
| 153 | +| buttonWidget | Widget? | - | 自定义按钮 | |
| 154 | +| width | | - | | |
| 155 | +| buttonStyleCustom | TDButtonStyle? | - | 按钮自定义样式属性,背景色、边框... | |
| 156 | + |
| 157 | +``` |
| 158 | +``` |
| 159 | + ### TDImageDialog |
| 160 | +#### 默认构造方法 |
| 161 | + |
| 162 | +| 参数 | 类型 | 默认值 | 说明 | |
| 163 | +| --- | --- | --- | --- | |
| 164 | +| key | | - | | |
| 165 | +| image | Image | - | 图片 | |
| 166 | +| imagePosition | TDDialogImagePosition? | TDDialogImagePosition.top | 图片位置 | |
| 167 | +| backgroundColor | Color | Colors.white | 背景颜色 | |
| 168 | +| radius | double | 12.0 | 圆角 | |
| 169 | +| title | String? | - | 标题 | |
| 170 | +| titleColor | Color | const Color(0xE6000000) | 标题颜色 | |
| 171 | +| titleAlignment | AlignmentGeometry? | - | 标题对齐模式 | |
| 172 | +| contentWidget | Widget? | - | 内容Widget | |
| 173 | +| content | String? | - | 内容 | |
| 174 | +| contentColor | Color? | - | 内容颜色 | |
| 175 | +| leftBtn | TDDialogButtonOptions? | - | 左侧按钮配置 | |
| 176 | +| rightBtn | TDDialogButtonOptions? | - | 右侧按钮配置 | |
| 177 | +| showCloseButton | bool? | - | 显示右上角关闭按钮 | |
| 178 | +| padding | EdgeInsets? | - | 内容内边距 | |
| 179 | +| buttonWidget | Widget? | - | 自定义按钮 | |
194 | 180 |
|
195 | 181 | ``` |
196 | 182 | ``` |
|
216 | 202 | | padding | EdgeInsets? | const EdgeInsets.fromLTRB(24, 32, 24, 0) | 内容内边距 | |
217 | 203 | | buttonWidget | Widget? | - | 自定义按钮 | |
218 | 204 | | customInputWidget | Widget? | - | 自定义输入框 | |
| 205 | + |
| 206 | +``` |
| 207 | +``` |
| 208 | + ### TDDialogButtonOptions |
| 209 | +#### 默认构造方法 |
| 210 | + |
| 211 | +| 参数 | 类型 | 默认值 | 说明 | |
| 212 | +| --- | --- | --- | --- | |
| 213 | +| title | String | - | 标题内容 | |
| 214 | +| action | Function()? | - | 点击操作 | |
| 215 | +| titleColor | Color? | - | 标题颜色 | |
| 216 | +| titleSize | double? | - | 字体大小 | |
| 217 | +| style | TDButtonStyle? | - | 按钮样式 | |
| 218 | +| type | TDButtonType? | - | 按钮类型 | |
| 219 | +| theme | TDButtonTheme? | - | 按钮类型 | |
| 220 | +| height | double? | - | 按钮高度 | |
| 221 | +| fontWeight | FontWeight? | - | 字体粗细 | |
0 commit comments