Merge branch 'master' of 192.168.2.201:aku_fe/ansu_ui

* 'master' of 192.168.2.201:aku_fe/ansu_ui:
  update text extension
  update text extension
null_safety
小赖 4 years ago
commit 92490de043

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

@ -5,7 +5,7 @@ extension TextStyleExtension on TextStyle {
TextStyle get bold => this.copyWith(fontWeight: FontWeight.bold);
///size
TextStyle size(double size) => this.copyWith(fontSize: size.w);
TextStyle size(double size) => this.copyWith(fontSize: size.sp);
///color
TextStyle colorX(Color color) => this.copyWith(color: color);

Loading…
Cancel
Save