@@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in
1717
1818``` yaml
1919dependencies :
20- flutter_custom_dialog : ^1.0.14
20+ flutter_custom_dialog : ^1.0.15
2121` ` `
2222
2323**2、import**
@@ -219,18 +219,42 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
219219dialog property Settings can be called through the method of member variables, as detailed in the following table
220220
221221``` 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+ ))
227252 ..animatedFunc = (child, animation) {
228253 return ScaleTransition(
229254 child: child,
230255 scale: Tween(begin: 0.0, end: 1.0).animate(animation),
231256 );
232257 }
233- ..borderRadius = 4.0
234258 ..show();
235259}
236260```
@@ -250,6 +274,8 @@ backgroundColor|Dialog backgroundColor|white
250274borderRadius|Dialog borderRadius|0.0
251275constraints|Dialog constraints|no constraints
252276animatedFunc|Animation of dialog|Emerge from the middle
277+ showCallBack|dialog show callbacks|not
278+ dismissCallBack|dialog dismiss callbacks|not
253279barrierDismissible|Whether to click to pop up the external disappear|true
254280
255281Supported method
0 commit comments