AppText constructor
AppText(
- String title, {
- Key? key,
- double? fontSize,
- Color? color,
- FontWeight? fontWeight,
- TextAlign? textAlign,
- int? maxLines,
- TextOverflow? textOverflow,
- TextStyle? style,
- double? height,
- bool withFontMargin = false,
- TextDecoration? textDecoration,
Implementation
AppText(String title,
{super.key,
double? fontSize,
Color? color,
FontWeight? fontWeight,
TextAlign? textAlign,
int? maxLines,
TextOverflow? textOverflow,
TextStyle? style,
double? height,
bool withFontMargin = false,
TextDecoration? textDecoration})
: super(
margin: withFontMargin ? const EdgeInsets.only(bottom: 4.5) : null,
child: Text(
textAlign: textAlign ?? PayorcSdkUiConstants.textAlign,
title,
overflow: textOverflow ?? PayorcSdkUiConstants.textOverflow,
maxLines: maxLines ?? PayorcSdkUiConstants.textMaxLines,
softWrap: PayorcSdkUiConstants.textSoftWrap,
style: style ??
TextStyle(
color: color ?? PayorcSdkUiConstants.textPrimaryOrDefault,
fontSize: fontSize ?? PayorcSdkUiConstants.textFontSize,
fontWeight:
fontWeight ?? PayorcSdkUiConstants.textFontWeight,
fontFamily: _resolveBodyFontFamily(),
letterSpacing: PayorcSdkUiConstants.textLetterSpacing,
height: height,
decoration:
textDecoration ?? PayorcSdkUiConstants.textDecoration,
wordSpacing: PayorcSdkUiConstants.textWordSpacing,
shadows: PayorcSdkUiConstants.textShadows,
fontStyle: PayorcSdkUiConstants.textFontStyle,
),
),
);