@@ -17,6 +17,7 @@ class YYDialog {
1717 bool gravityAnimationEnable = false ; //弹窗出现的位置带有的默认动画是否可用
1818 Color barrierColor = Colors .black.withOpacity (.3 ); //弹窗外的背景色
1919 Color backgroundColor = Colors .white; //弹窗内的背景色
20+ Decoration decoration;
2021 double borderRadius = 0.0 ; //弹窗圆角
2122 BoxConstraints constraints; //弹窗约束
2223 Function (Widget child, Animation <double > animation) animatedFunc; //弹窗出现的动画
@@ -275,7 +276,7 @@ class YYDialog {
275276 padding: EdgeInsets .all (borderRadius / 3.14 ),
276277 width: width ?? null ,
277278 height: height ?? null ,
278- decoration: BoxDecoration (
279+ decoration: decoration ?? BoxDecoration (
279280 borderRadius: BorderRadius .circular (borderRadius),
280281 color: backgroundColor,
281282 ),
@@ -384,10 +385,10 @@ class YYDialog {
384385
385386///弹窗的内容作为可变组件
386387class CustomDialogChildren extends StatefulWidget {
387- List <Widget > widgetList = [] ; //弹窗内部所有组件
388- Function (bool ) isShowingChange;
388+ final List <Widget > widgetList; //弹窗内部所有组件
389+ final Function (bool ) isShowingChange;
389390
390- CustomDialogChildren ({this .widgetList, this .isShowingChange});
391+ CustomDialogChildren ({this .widgetList = const [] , this .isShowingChange});
391392
392393 @override
393394 CustomDialogChildState createState () => CustomDialogChildState ();
0 commit comments