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.
ansu_ui/lib/extension/text_style_extension.dart

23 lines
602 B

part of ansu_ui;
extension TextStyleExtension on TextStyle {
4 years ago
///Bold text
TextStyle get bold => this.copyWith(fontWeight: FontWeight.bold);
4 years ago
///size
TextStyle size(double size) => this.copyWith(fontSize: size.sp);
4 years ago
///color
TextStyle colorX(Color color) => this.copyWith(color: color);
4 years ago
//specific values
TextStyle get white => this.copyWith(color: kLightTextColor);
TextStyle get black => this.copyWith(color: kTextColor);
TextStyle get black65 => this.copyWith(color: kTextSubColor);
4 years ago
///FontWeight:w300
TextStyle get light => this.copyWith(fontWeight: FontWeight.w300);
}