getSpan static method

TextSpan getSpan(
  1. String text, {
  2. UFUTextSize textSize = UFUTextSize.heading4,
  3. UFUFontWeight fontWeight = UFUFontWeight.regular,
  4. Color? textColor,
  5. TextOverflow? overflow,
  6. TextAlign textAlign = TextAlign.center,
  7. int? maxLine,
  8. TextDecoration? textDecoration,
  9. List<InlineSpan>? children,
  10. double? letterSpacing,
  11. GestureRecognizer? recognizer,
  12. FontStyle? fontStyle,
  13. double? height,
})

Implementation

static TextSpan getSpan(String text, {
  UFUTextSize textSize = UFUTextSize.heading4,
  // UFUFontFamily fontFamily = UFUFontFamily.productSans,
  UFUFontWeight fontWeight = UFUFontWeight.regular,
  Color? textColor,
  TextOverflow? overflow,
  TextAlign textAlign = TextAlign.center,
  int? maxLine,
  TextDecoration? textDecoration,
  List<InlineSpan>? children,
  double? letterSpacing,
  GestureRecognizer? recognizer,
  FontStyle? fontStyle,
  double? height}) {
return TextSpan(
      text: text,
      recognizer: recognizer,
      style: TextStyle(
        color: textColor ?? AppTheme.themeColors.text,
        fontSize: TextHelper.getTextSize(textSize),
        fontFamily: UFUtils.fontFamily, // TODO - TextHelper.getFontFamily(fontFamily,fontWeight),
        fontWeight: TextHelper.getFontWeight(fontWeight),
        // package: 'UFU_mobile_flutter_ui',
        overflow: overflow,
        height: height,
        fontStyle: fontStyle,
        decoration: textDecoration,
        letterSpacing: letterSpacing,
      ),
      children: children);
}