BaseFieldInput constructor

const BaseFieldInput({
  1. Key? key,
  2. String? label,
  3. String? initialValue = '',
  4. double fontSize = 18,
  5. TextAlign textAlign = TextAlign.start,
  6. FontWeight fontWeight = FontWeight.bold,
  7. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12),
  8. String placeholder = 'Type a text',
  9. double? placeholderFontSize = 18,
  10. MainAxisAlignment placeholderTextAlign = MainAxisAlignment.start,
  11. FontWeight placeholderFontWeight = FontWeight.bold,
  12. EdgeInsets placeholderPadding = EdgeInsets.zero,
  13. double? width,
  14. double height = 40,
  15. Border? border,
  16. BorderRadiusGeometry? borderRadius,
  17. Color? background,
  18. Widget leading = const SizedBox(),
  19. Widget trailing = const SizedBox(),
  20. bool? isError,
  21. bool obscureText = false,
  22. TextInputType? keyboardType,
  23. Iterable<String>? autofillHints,
  24. TextEditingController? controller,
  25. String? validator(
    1. String?
    )?,
  26. void onChanged(
    1. String?
    )?,
})

Implementation

const BaseFieldInput({
  super.key,

  // label
  this.label,

  // value
  this.initialValue = '',
  this.fontSize = 18,
  this.textAlign = TextAlign.start,
  this.fontWeight = FontWeight.bold,
  this.padding = const EdgeInsets.symmetric(
    horizontal: 12,
  ),

  // placeholder
  this.placeholder = 'Type a text',
  this.placeholderFontSize = 18,
  this.placeholderTextAlign = MainAxisAlignment.start,
  this.placeholderFontWeight = FontWeight.bold,
  this.placeholderPadding = EdgeInsets.zero,

  // appearance
  this.width,
  this.height = 40,
  this.border,
  this.borderRadius,
  this.background,
  this.leading = const SizedBox(),
  this.trailing = const SizedBox(),
  this.isError,

  // behaviour
  this.obscureText = false,
  this.keyboardType,
  this.autofillHints,
  this.controller,
  this.validator,
  this.onChanged,
});