textDecor function

InputDecoration textDecor({
  1. String? hint,
  2. Icon? prefixIcon,
  3. Widget? suffix,
  4. String prefix = '',
  5. bool enabled = true,
  6. double hintSize = 16,
  7. bool showBorder = true,
})

Implementation

InputDecoration textDecor(
    {String? hint,
    Icon? prefixIcon,
    Widget? suffix,
    String prefix = '',
    bool enabled = true,
    double hintSize = 16,
    bool showBorder = true}) {
  return new InputDecoration(
    prefixIcon: prefixIcon,
    prefixText: prefix,
    suffix: suffix,
    labelText: hint,
    hintStyle: TextStyle(fontSize: hintSize, color: appGray),
    enabledBorder: OutlineInputBorder(
      borderSide: BorderSide(color: appDarkText.withOpacity(0.1), width: 1),
      borderRadius: BorderRadius.circular(4),
    ),
    focusedBorder: OutlineInputBorder(
      borderSide: BorderSide(color: appDarkText.withOpacity(0.1), width: 1),
      borderRadius: BorderRadius.circular(4),
    ),
    labelStyle: TextStyle(fontSize: hintSize, color: appGray),
    filled: true,
    fillColor: Colors.white,
    contentPadding: EdgeInsets.fromLTRB(20.0, 12.0, 20.0, 12.0),
  );
}