diff --git a/lib/extension/text_extension.dart b/lib/extension/text_extension.dart index e5108e1..a56dcdf 100644 --- a/lib/extension/text_extension.dart +++ b/lib/extension/text_extension.dart @@ -21,6 +21,11 @@ extension TextExtension on Text { ); } + Text height(double height) => Text( + this.data, + style: this.style?.heightX(height) ?? TextStyle().heightX(height), + ); + Text get white => Text(this.data, style: this.style?.white ?? TextStyle().white); diff --git a/lib/extension/text_style_extension.dart b/lib/extension/text_style_extension.dart index 50d9b6d..f6155b2 100644 --- a/lib/extension/text_style_extension.dart +++ b/lib/extension/text_style_extension.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:ansu_ui/styles/as_colors.dart'; - extension TextStyleExtension on TextStyle { ///Bold text TextStyle get bold => this.copyWith(fontWeight: FontWeight.bold); @@ -22,4 +21,6 @@ extension TextStyleExtension on TextStyle { ///FontWeight:w300 TextStyle get light => this.copyWith(fontWeight: FontWeight.w300); + + TextStyle heightX(double height) => this.copyWith(height: height); }