buildSpecialInput method

Widget buildSpecialInput(
  1. BuildContext context
)

Implementation

Widget buildSpecialInput(BuildContext context) {
  return Stack(
    alignment: Alignment.bottomCenter,
    children: [
      Container(
        alignment: Alignment.centerLeft,
        color: decoration != null ? null : backgroundColor,
        decoration: decoration,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: <Widget>[
            Visibility(
              visible: leftLabel != null,
              child: Padding(
                padding: EdgeInsets.only(
                    left: 16,
                    top: getInputPadding(),
                    bottom: getInputPadding()),
                child: leftInfoWidth != null
                    ? SizedBox(
                        width: leftInfoWidth,
                        child: TDText(
                          leftLabel,
                          maxLines: 1,
                          font: TDTheme.of(context).fontBodyLarge,
                          fontWeight: FontWeight.w400,
                        ),
                      )
                    : TDText(
                        leftLabel,
                        maxLines: 1,
                        font: TDTheme.of(context).fontBodyLarge,
                        fontWeight: FontWeight.w400,
                      ),
              ),
            ),
            Visibility(
              visible: labelWidget != null,
              child: labelWidget ?? const SizedBox.shrink(),
            ),
            Expanded(
              flex: 1,
              child: Padding(
                padding: const EdgeInsets.only(left: 8),
                child: TDInputView(
                  textStyle: textStyle ??
                      TextStyle(color: TDTheme.of(context).fontGyColor1),
                  readOnly: readOnly,
                  autofocus: autofocus,
                  obscureText: obscureText,
                  onEditingComplete: onEditingComplete,
                  onSubmitted: onSubmitted,
                  hintText: hintText,
                  inputType: inputType,
                  onChanged: onChanged,
                  inputFormatters: inputFormatters,
                  inputDecoration: inputDecoration,
                  maxLines: maxLines,
                  focusNode: focusNode,
                  isCollapsed: true,
                  hintTextStyle: hintTextStyle ??
                      TextStyle(color: TDTheme.of(context).fontGyColor3),
                  cursorColor: cursorColor,
                  textInputBackgroundColor: textInputBackgroundColor,
                  controller: controller,
                  textAlign: textAlign,
                  contentPadding: contentPadding ??
                      EdgeInsets.only(
                          right: 8,
                          bottom: getInputPadding(),
                          top: getInputPadding()),
                ),
              ),
            ),
            Visibility(
              visible: rightWidget != null,
              child: Container(
                margin: EdgeInsets.only(
                    top: getInputPadding(),
                    bottom: getInputPadding(),
                    right: 16),
                child: rightWidget,
              ),
            ),
          ],
        ),
      ),
      const Visibility(
        child: TDDivider(
          margin: EdgeInsets.only(
            left: 16,
          ),
        ),
      ),
    ],
  );
}