|
|
|
|
@ -18,6 +18,7 @@ class AppText extends StatefulWidget {
|
|
|
|
|
final double marginRight;
|
|
|
|
|
final double marginBottom;
|
|
|
|
|
final double marginLeft;
|
|
|
|
|
final double letterSpacing;
|
|
|
|
|
final TextAlign textAlign;
|
|
|
|
|
final bool bold;
|
|
|
|
|
final bool regular;
|
|
|
|
|
@ -56,6 +57,7 @@ class AppText extends StatefulWidget {
|
|
|
|
|
this.visibility = true,
|
|
|
|
|
this.textOverflow,
|
|
|
|
|
this.textDecoration,
|
|
|
|
|
this.letterSpacing,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -127,16 +129,15 @@ class _AppTextState extends State<AppText> {
|
|
|
|
|
fontWeight: widget.fontWeight ?? _getFontWeight(),
|
|
|
|
|
height: widget.fontHeight)
|
|
|
|
|
: TextStyle(
|
|
|
|
|
fontStyle: widget.italic ? FontStyle.italic : null,
|
|
|
|
|
color:
|
|
|
|
|
widget.color != null ? widget.color : Colors.black,
|
|
|
|
|
fontSize: widget.fontSize ?? _getFontSize(),
|
|
|
|
|
letterSpacing:
|
|
|
|
|
widget.variant == "overline" ? 1.5 : null,
|
|
|
|
|
fontWeight: widget.fontWeight ?? _getFontWeight(),
|
|
|
|
|
fontFamily: widget.fontFamily ?? 'Poppins',
|
|
|
|
|
decoration: widget.textDecoration,
|
|
|
|
|
height: widget.fontHeight),
|
|
|
|
|
fontStyle: widget.italic ? FontStyle.italic : null,
|
|
|
|
|
color:
|
|
|
|
|
widget.color != null ? widget.color : Colors.black,
|
|
|
|
|
fontSize: widget.fontSize ?? _getFontSize(),
|
|
|
|
|
letterSpacing: widget.letterSpacing,
|
|
|
|
|
fontWeight: widget.fontWeight ?? _getFontWeight(),
|
|
|
|
|
fontFamily: widget.fontFamily ?? 'Poppins',
|
|
|
|
|
decoration: widget.textDecoration,
|
|
|
|
|
height: widget.fontHeight),
|
|
|
|
|
),
|
|
|
|
|
if (widget.readMore && text.length > widget.maxLength && hidden)
|
|
|
|
|
Positioned(
|
|
|
|
|
|