InputOptions.minimal constructor
InputOptions.minimal({})
Creates a minimal input field with no outer container.
Implementation
factory InputOptions.minimal({
String? hintText,
Color? textColor,
Color? hintColor,
Color? backgroundColor,
double? borderRadius,
TextEditingController? textController,
bool sendOnEnter = true,
}) {
return InputOptions(
textController: textController,
useOuterContainer: false,
sendOnEnter: sendOnEnter,
textStyle: textColor != null ? TextStyle(color: textColor) : null,
decoration: InputDecoration(
hintText: hintText,
hintStyle: hintColor != null ? TextStyle(color: hintColor) : null,
filled: backgroundColor != null,
fillColor: backgroundColor,
border: borderRadius != null
? OutlineInputBorder(
borderRadius: BorderRadius.circular(borderRadius),
borderSide: BorderSide.none,
)
: null,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 10.0,
),
),
);
}