@@ -45,7 +45,8 @@ class YYDialog {
4545 return this ;
4646 }
4747
48- YYDialog text ({padding, text, color, fontSize, alignment, fontWeight}) {
48+ YYDialog text (
49+ {padding, text, color, fontSize, alignment, fontWeight, fontFamily}) {
4950 return this .widget (
5051 Padding (
5152 padding: padding ?? EdgeInsets .all (0.0 ),
@@ -57,6 +58,7 @@ class YYDialog {
5758 color: color ?? Colors .black,
5859 fontSize: fontSize ?? 14.0 ,
5960 fontWeight: fontWeight,
61+ fontFamily: fontFamily,
6062 ),
6163 ),
6264 ),
@@ -74,11 +76,13 @@ class YYDialog {
7476 color1,
7577 fontSize1,
7678 fontWeight1,
79+ fontFamily1,
7780 VoidCallback onTap1,
7881 text2,
7982 color2,
8083 fontSize2,
8184 fontWeight2,
85+ fontFamily2,
8286 onTap2,
8387 }) {
8488 return this .widget (
@@ -100,7 +104,8 @@ class YYDialog {
100104 style: TextStyle (
101105 color: color1 ?? null ,
102106 fontSize: fontSize1 ?? null ,
103- fontWeight: fontWeight1 ?? null ,
107+ fontWeight: fontWeight1,
108+ fontFamily: fontFamily1,
104109 ),
105110 ),
106111 ),
@@ -121,7 +126,8 @@ class YYDialog {
121126 style: TextStyle (
122127 color: color2 ?? Colors .black,
123128 fontSize: fontSize2 ?? 14.0 ,
124- fontWeight: fontWeight2 ?? null ,
129+ fontWeight: fontWeight2,
130+ fontFamily: fontFamily2,
125131 ),
126132 ),
127133 )
@@ -164,7 +170,8 @@ class YYDialog {
164170 style: TextStyle (
165171 color: items[index].color ?? null ,
166172 fontSize: items[index].fontSize ?? null ,
167- fontWeight: items[index].fontWeight ?? null ,
173+ fontWeight: items[index].fontWeight,
174+ fontFamily: items[index].fontFamily,
168175 ),
169176 ),
170177 ),
@@ -226,7 +233,6 @@ class YYDialog {
226233 void show ([x, y]) {
227234 var mainAxisAlignment = getColumnMainAxisAlignment (gravity);
228235 var crossAxisAlignment = getColumnCrossAxisAlignment (gravity);
229- Size size = MediaQuery .of (this .context).size;
230236 if (x != null && y != null ) {
231237 gravity = Gravity .leftTop;
232238 margin = EdgeInsets .only (left: x, top: y);
@@ -523,6 +529,7 @@ class ListTileItem {
523529 this .color,
524530 this .fontSize,
525531 this .fontWeight,
532+ this .fontFamily,
526533 });
527534
528535 EdgeInsets padding;
@@ -531,6 +538,7 @@ class ListTileItem {
531538 Color color;
532539 double fontSize;
533540 FontWeight fontWeight;
541+ String fontFamily;
534542}
535543
536544class RadioItem {
0 commit comments