JuiFlatInput constructor
JuiFlatInput({
- Key? key,
- String? labelText,
- dynamic hintText,
- dynamic initialValue,
- TextEditingController? controller,
- dynamic onChanged,
- dynamic onTap,
- Color color = JuiColors.primaryColor,
- bool? disabled,
- bool? isPassword,
- dynamic validator,
- dynamic placeholder,
- dynamic keyboardType,
- dynamic inputFormatters,
- TextStyle? style,
- bool readOnly = false,
- dynamic label,
- dynamic suffixIcon,
Implementation
JuiFlatInput({
Key? key,
String? labelText,
hintText,
initialValue,
TextEditingController? controller,
onChanged,
onTap,
Color color = JuiColors.primaryColor,
bool? disabled,
bool? isPassword,
validator,
placeholder,
keyboardType,
inputFormatters,
TextStyle? style,
bool readOnly = false,
label,
suffixIcon,
}) : super(
key: key,
initialValue: initialValue,
controller: controller,
onChanged: onChanged,
validator: validator,
keyboardType: keyboardType,
inputFormatters: inputFormatters,
style:
const TextStyle().regular(color: disabled == true ? JuiColors.gray.shade300 : color),
cursorColor: color,
scrollPadding: EdgeInsets.all(JuiBreakpoints.b40),
readOnly: readOnly,
onTap: onTap,
decoration: InputDecoration(
floatingLabelBehavior: FloatingLabelBehavior.always,
floatingLabelStyle: const TextStyle().regularBold(color: color),
labelStyle: const TextStyle().bigText(color: color),
label: label,
labelText: labelText,
hintText: hintText,
filled: disabled == true,
fillColor: JuiColors.gray.shade50,
enabled: !(disabled == true),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: JuiColors.gray.shade200,
width: 1.0.r,
),
),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: JuiColors.gray.shade50,
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: JuiColors.gray.shade200,
width: 1.0.r,
),
),
errorBorder: const UnderlineInputBorder(
borderSide: BorderSide(
color: JuiColors.error,
),
),
focusedErrorBorder: const UnderlineInputBorder(
borderSide: BorderSide(
color: JuiColors.error,
),
),
suffixIcon: suffixIcon,
),
);