antDesign static method

InputDecoration antDesign({
  1. required String hint,
  2. IconData? prefixIcon,
  3. IconData? suffixIcon,
})

Ant Design inspired clean borderless input

Implementation

static InputDecoration antDesign({
  required String hint,
  IconData? prefixIcon,
  IconData? suffixIcon,
}) {
  return InputDecoration(
    hintText: hint,
    border: InputForm.noBorder(),
    enabledBorder: InputForm.noBorder(),
    focusedBorder: InputForm.noBorder(),
    prefixIcon: prefixIcon != null ? Icon(prefixIcon) : null,
    suffixIcon: suffixIcon != null ? Icon(suffixIcon) : null,
    contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  );
}