Skip to content

Commit 3024cf3

Browse files
author
xuyingjun
committed
fontFamily v1.0.8
1 parent 7a96b32 commit 3024cf3

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@
2929

3030
## 1.0.7
3131

32-
* Fix Gradle build Aar
32+
* Fix Gradle build Aar
33+
34+
## 1.0.8
35+
36+
* Fix Gradle build Aar for iOS

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in
1717

1818
```yaml
1919
dependencies:
20-
flutter_custom_dialog: ^1.0.7
20+
flutter_custom_dialog: ^1.0.8
2121
```
2222
2323
**2、import**

README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
```yaml
1717
dependencies:
18-
flutter_custom_dialog: ^1.0.7
18+
flutter_custom_dialog: ^1.0.8
1919
```
2020
2121
**2、import**

lib/flutter_custom_dialog.dart

+13-5
Original file line numberDiff line numberDiff line change
@@ -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

536544
class RadioItem {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_custom_dialog
22
description: Semantic dialog
3-
version: 1.0.7
3+
version: 1.0.8
44
author: AndroidHensen <xyj510402535@qq.com>
55
homepage: https://github.com/YYFlutter/flutter-custom-dialog.git
66

0 commit comments

Comments
 (0)