AppText constructor

AppText(
  1. String title, {
  2. Key? key,
  3. double? fontSize,
  4. Color? color,
  5. FontWeight? fontWeight,
  6. TextAlign? textAlign,
  7. int? maxLines,
  8. TextOverflow? textOverflow,
  9. TextStyle? style,
  10. double? height,
  11. bool withFontMargin = false,
  12. 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,
              ),
        ),
      );