@@ -45,7 +45,8 @@ class YYDialog {
45
45
return this ;
46
46
}
47
47
48
- YYDialog text ({padding, text, color, fontSize, alignment, fontWeight}) {
48
+ YYDialog text (
49
+ {padding, text, color, fontSize, alignment, fontWeight, fontFamily}) {
49
50
return this .widget (
50
51
Padding (
51
52
padding: padding ?? EdgeInsets .all (0.0 ),
@@ -57,6 +58,7 @@ class YYDialog {
57
58
color: color ?? Colors .black,
58
59
fontSize: fontSize ?? 14.0 ,
59
60
fontWeight: fontWeight,
61
+ fontFamily: fontFamily,
60
62
),
61
63
),
62
64
),
@@ -74,11 +76,13 @@ class YYDialog {
74
76
color1,
75
77
fontSize1,
76
78
fontWeight1,
79
+ fontFamily1,
77
80
VoidCallback onTap1,
78
81
text2,
79
82
color2,
80
83
fontSize2,
81
84
fontWeight2,
85
+ fontFamily2,
82
86
onTap2,
83
87
}) {
84
88
return this .widget (
@@ -100,7 +104,8 @@ class YYDialog {
100
104
style: TextStyle (
101
105
color: color1 ?? null ,
102
106
fontSize: fontSize1 ?? null ,
103
- fontWeight: fontWeight1 ?? null ,
107
+ fontWeight: fontWeight1,
108
+ fontFamily: fontFamily1,
104
109
),
105
110
),
106
111
),
@@ -121,7 +126,8 @@ class YYDialog {
121
126
style: TextStyle (
122
127
color: color2 ?? Colors .black,
123
128
fontSize: fontSize2 ?? 14.0 ,
124
- fontWeight: fontWeight2 ?? null ,
129
+ fontWeight: fontWeight2,
130
+ fontFamily: fontFamily2,
125
131
),
126
132
),
127
133
)
@@ -164,7 +170,8 @@ class YYDialog {
164
170
style: TextStyle (
165
171
color: items[index].color ?? null ,
166
172
fontSize: items[index].fontSize ?? null ,
167
- fontWeight: items[index].fontWeight ?? null ,
173
+ fontWeight: items[index].fontWeight,
174
+ fontFamily: items[index].fontFamily,
168
175
),
169
176
),
170
177
),
@@ -226,7 +233,6 @@ class YYDialog {
226
233
void show ([x, y]) {
227
234
var mainAxisAlignment = getColumnMainAxisAlignment (gravity);
228
235
var crossAxisAlignment = getColumnCrossAxisAlignment (gravity);
229
- Size size = MediaQuery .of (this .context).size;
230
236
if (x != null && y != null ) {
231
237
gravity = Gravity .leftTop;
232
238
margin = EdgeInsets .only (left: x, top: y);
@@ -523,6 +529,7 @@ class ListTileItem {
523
529
this .color,
524
530
this .fontSize,
525
531
this .fontWeight,
532
+ this .fontFamily,
526
533
});
527
534
528
535
EdgeInsets padding;
@@ -531,6 +538,7 @@ class ListTileItem {
531
538
Color color;
532
539
double fontSize;
533
540
FontWeight fontWeight;
541
+ String fontFamily;
534
542
}
535
543
536
544
class RadioItem {
0 commit comments