getText method

Widget getText()

Implementation

Widget getText() {
  if (text == null) return const SizedBox.shrink();

  Widget buttonText = UFUText(
    text: text!,
    // fontFamily: fontFamily,
    fontWeight: fontWeight,
    textColor: color ?? AppTheme.themeColors.text,
    textDecoration: textDecoration,
    decorationColor: decorationColor,
    overflow: TextOverflow.ellipsis,
    textSize: textSize,
  );

  if (icon != null) {
    return Flexible(child: buttonText);
  }

  return buttonText;
}