createInputDecoration static method
Implementation
static InputDecoration createInputDecoration({
required BuildContext context,
required bool isChanged,
String? placeholder,
String? label,
double? maxHeight,
String? helper,
}) {
const OutlineInputBorder border = OutlineInputBorder();
final InputDecoration effectiveDecoration = InputDecoration(
hintText: placeholder,
labelText: label,
border: border,
enabledBorder: isChanged
? border.copyWith(
borderSide: BorderSide(
color: context.kitColors.successColor,
),
)
: null,
focusedBorder: isChanged
? border.copyWith(
borderSide: BorderSide(
color: context.kitColors.successColor,
width: 2,
),
)
: null,
errorMaxLines: 1,
isDense: true,
constraints: maxHeight == null ? null : BoxConstraints(maxHeight: maxHeight),
helperText: helper,
filled: true,
);
return effectiveDecoration;
}