add text.light

null_safety
张萌 4 years ago
parent e866a2b12c
commit 8640d8db6f

@ -29,20 +29,25 @@ extension TextExtension on Text {
Text get black65 =>
Text(this.data, style: this.style?.black65 ?? TextStyle().black65);
Text lines(int maxLines){
Text lines(int maxLines) {
return Text(
this.data,
maxLines: maxLines,
);
}
Text over(TextOverflow textOverflow){
Text over(TextOverflow textOverflow) {
return Text(
this.data,
overflow:textOverflow,
overflow: textOverflow,
);
}
Text get light => Text(
this.data,
style: this.style?.light ?? TextStyle().light,
);
Text copyWith({
FontWeight fontWeight,
Color color,

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

Loading…
Cancel
Save