getLabel method
Implementation
Widget getLabel() => Padding(
padding: EdgeInsets.symmetric(
horizontal: isLabelOutside ? 0 : 12,
),
child: Stack(
children: [
Positioned.fill(
child: Align(
alignment: Alignment.bottomCenter,
child: Container(
height: (widget.isRequired! ? 10 : 8) * scale,
color: widget.labelBgColor ?? AppTheme.themeColors.base,
),
),
),
Padding(
padding: EdgeInsets.only(right: 3, left: 4, bottom: 1.5 * scale),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Flexible(
child: UFUText(
text: getLabelText(),
maxLine: 1,
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
height: 0,
textSize: isLabelOutside
? UFUTextSize.heading3
: UFUTextSize.heading5,
fontWeight: isLabelOutside
? widget.outsideLabelFontWeight
: UFUFontWeight.regular,
),
),
if (widget.isRequired! && !isLabelOutside)
UFUText(
text: ' *',
maxLine: 1,
textAlign: TextAlign.start,
textColor: AppTheme.themeColors.red,
overflow: TextOverflow.ellipsis,
textSize: UFUTextSize.heading4,
),
],
),
),
],
),
);