@@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in
17
17
18
18
``` yaml
19
19
dependencies :
20
- flutter_custom_dialog : ^1.0.14
20
+ flutter_custom_dialog : ^1.0.15
21
21
` ` `
22
22
23
23
**2、import**
@@ -219,18 +219,42 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
219
219
dialog property Settings can be called through the method of member variables, as detailed in the following table
220
220
221
221
``` dart
222
- YYDialog YYDialogDemo(BuildContext context) {
223
- return YYDialog().build(context)
224
- ..width = 220
225
- ..height = 500
226
- ..barrierColor = Colors.black.withOpacity(.3)
222
+ YYDialog YYNoticeDialog() {
223
+ return YYDialog().build()
224
+ ..width = 120
225
+ ..height = 110
226
+ ..backgroundColor = Colors.black.withOpacity(0.8)
227
+ ..borderRadius = 10.0
228
+ ..showCallBack = () {
229
+ print("showCallBack invoke");
230
+ }
231
+ ..dismissCallBack = () {
232
+ print("dismissCallBack invoke");
233
+ }
234
+ ..widget(Padding(
235
+ padding: EdgeInsets.only(top: 21),
236
+ child: Image.asset(
237
+ 'images/success.png',
238
+ width: 38,
239
+ height: 38,
240
+ ),
241
+ ))
242
+ ..widget(Padding(
243
+ padding: EdgeInsets.only(top: 10),
244
+ child: Text(
245
+ "Success",
246
+ style: TextStyle(
247
+ fontSize: 15,
248
+ color: Colors.white,
249
+ ),
250
+ ),
251
+ ))
227
252
..animatedFunc = (child, animation) {
228
253
return ScaleTransition(
229
254
child: child,
230
255
scale: Tween(begin: 0.0, end: 1.0).animate(animation),
231
256
);
232
257
}
233
- ..borderRadius = 4.0
234
258
..show();
235
259
}
236
260
```
@@ -250,6 +274,8 @@ backgroundColor|Dialog backgroundColor|white
250
274
borderRadius|Dialog borderRadius|0.0
251
275
constraints|Dialog constraints|no constraints
252
276
animatedFunc|Animation of dialog|Emerge from the middle
277
+ showCallBack|dialog show callbacks|not
278
+ dismissCallBack|dialog dismiss callbacks|not
253
279
barrierDismissible|Whether to click to pop up the external disappear|true
254
280
255
281
Supported method
0 commit comments