buildLongTextInput method
Implementation
Widget buildLongTextInput(BuildContext context) {
return Container(
alignment: Alignment.centerLeft,
color: decoration != null ? null : backgroundColor,
decoration: decoration,
height: leftLabel != null ? 197 : 148,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Visibility(
visible: leftLabel != null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
left: 16,
top: getInputPadding(),
bottom: getInputPadding()),
child: TDText(
leftLabel,
maxLines: 2,
fontWeight: FontWeight.w400,
)),
const TDDivider(
margin: EdgeInsets.only(
left: 16,
),
),
],
),
),
Expanded(
flex: 1,
child: TDInputView(
textStyle: textStyle ??
TextStyle(color: TDTheme.of(context).fontGyColor1),
readOnly: readOnly,
autofocus: autofocus,
obscureText: obscureText,
onEditingComplete: onEditingComplete,
onSubmitted: onSubmitted,
hintText: hintText,
inputType: inputType,
textAlign: textAlign,
onChanged: onChanged,
inputFormatters:
inputFormatters ?? [LengthLimitingTextInputFormatter(maxNum)],
inputDecoration: inputDecoration,
maxLines: maxLines,
focusNode: focusNode,
hintTextStyle: hintTextStyle ??
TextStyle(color: TDTheme.of(context).fontGyColor3),
cursorColor: cursorColor,
textInputBackgroundColor: textInputBackgroundColor,
controller: controller,
contentPadding: contentPadding ??
const EdgeInsets.only(
left: 16, right: 16, top: 12, bottom: 12),
),
),
Container(
alignment: Alignment.bottomRight,
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 12),
child: TDText(
'${controller?.text.length}/${maxNum}',
font: TDTheme.of(context).fontBodySmall,
textColor: TDTheme.of(context).fontGyColor3,
),
),
],
),
);
}