@@ -17,6 +17,7 @@ class YYDialog {
17
17
bool gravityAnimationEnable = false ; //弹窗出现的位置带有的默认动画是否可用
18
18
Color barrierColor = Colors .black.withOpacity (.3 ); //弹窗外的背景色
19
19
Color backgroundColor = Colors .white; //弹窗内的背景色
20
+ Decoration decoration;
20
21
double borderRadius = 0.0 ; //弹窗圆角
21
22
BoxConstraints constraints; //弹窗约束
22
23
Function (Widget child, Animation <double > animation) animatedFunc; //弹窗出现的动画
@@ -275,7 +276,7 @@ class YYDialog {
275
276
padding: EdgeInsets .all (borderRadius / 3.14 ),
276
277
width: width ?? null ,
277
278
height: height ?? null ,
278
- decoration: BoxDecoration (
279
+ decoration: decoration ?? BoxDecoration (
279
280
borderRadius: BorderRadius .circular (borderRadius),
280
281
color: backgroundColor,
281
282
),
@@ -384,10 +385,10 @@ class YYDialog {
384
385
385
386
///弹窗的内容作为可变组件
386
387
class CustomDialogChildren extends StatefulWidget {
387
- List <Widget > widgetList = [] ; //弹窗内部所有组件
388
- Function (bool ) isShowingChange;
388
+ final List <Widget > widgetList; //弹窗内部所有组件
389
+ final Function (bool ) isShowingChange;
389
390
390
- CustomDialogChildren ({this .widgetList, this .isShowingChange});
391
+ CustomDialogChildren ({this .widgetList = const [] , this .isShowingChange});
391
392
392
393
@override
393
394
CustomDialogChildState createState () => CustomDialogChildState ();
0 commit comments