You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
part of ansu_ui;
|
|
|
|
extension TextExtension on Text {
|
|
Text get bold => Text(
|
|
this.data,
|
|
style: this.style?.bold ?? TextStyle().bold,
|
|
);
|
|
|
|
Text size(double size) {
|
|
return Text(
|
|
this.data,
|
|
style: this.style?.size(size) ?? TextStyle().size(size),
|
|
);
|
|
}
|
|
|
|
Text color(Color color) {
|
|
return Text(
|
|
this.data,
|
|
style: this.style?.colorX(color) ?? TextStyle().colorX(color),
|
|
);
|
|
}
|
|
|
|
Text get white =>
|
|
Text(this.data, style: this.style?.white ?? TextStyle().white);
|
|
|
|
Text get black =>
|
|
Text(this.data, style: this.style?.black ?? TextStyle().black);
|
|
|
|
Text get black65 =>
|
|
Text(this.data, style: this.style?.black65 ?? TextStyle().black65);
|
|
|
|
Text maxLines(int maxLines){
|
|
return Text(
|
|
this.data,
|
|
maxLines: maxLines,
|
|
);
|
|
}
|
|
|
|
Text overflow(TextOverflow textOverflow){
|
|
return Text(
|
|
this.data,
|
|
overflow:textOverflow,
|
|
);
|
|
}
|
|
|
|
Text copyWith({
|
|
FontWeight fontWeight,
|
|
Color color,
|
|
double fontSize,
|
|
}) {
|
|
return Text(this.data,
|
|
style: this.style.copyWith(
|
|
fontWeight: fontWeight,
|
|
color: color,
|
|
fontSize: fontSize,
|
|
));
|
|
}
|
|
}
|