add text.light

null_safety
张萌 4 years ago
parent e866a2b12c
commit 8640d8db6f

@ -43,6 +43,11 @@ extension TextExtension on Text {
); );
} }
Text get light => Text(
this.data,
style: this.style?.light ?? TextStyle().light,
);
Text copyWith({ Text copyWith({
FontWeight fontWeight, FontWeight fontWeight,
Color color, Color color,

@ -16,4 +16,7 @@ extension TextStyleExtension on TextStyle {
TextStyle get black => this.copyWith(color: kTextColor); TextStyle get black => this.copyWith(color: kTextColor);
TextStyle get black65 => this.copyWith(color: kTextSubColor); TextStyle get black65 => this.copyWith(color: kTextSubColor);
///FontWeight:w300
TextStyle get light => this.copyWith(fontWeight: FontWeight.w300);
} }

Loading…
Cancel
Save