buildLabel method

Widget buildLabel(
  1. BuildContext context
)

Implementation

Widget buildLabel(BuildContext context) {
  final textColor = ThemeHelper.texts.getBodyTextStyle(context).color;
  String? text = labelText;

  if (capitalizeLabelText) {
    text = toBeginningOfSentenceCase(labelText);
  }

  text ??= kFastEmptyString;

  if (showLabelBorder) {
    return FastSubtitle(text: text, textColor: textColor);
  }

  return FastSecondaryBody(text: text, textColor: textColor);
}