BsInput constructor

BsInput({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? initialValue,
  4. BsInputSize size = BsInputSize.md,
  5. bool disabled = false,
  6. bool readonly = false,
  7. bool plainText = false,
  8. String? placeholder,
  9. TextInputType? keyboardType,
  10. bool obscureText = false,
  11. int? maxLines = 1,
  12. int? minLines,
  13. FocusNode? focusNode,
  14. ValueChanged<String>? onChanged,
  15. ValueChanged<String>? onFieldSubmitted,
  16. BsValidationState? validationState,
  17. BorderRadius? customBorderRadius,
  18. FormFieldValidator<String>? validator,
  19. FormFieldSetter<String>? onSaved,
  20. AutovalidateMode? autovalidateMode,
})

Creates a BsInput.

Implementation

BsInput({
  super.key,
  this.controller,
  String? initialValue,
  this.size = BsInputSize.md,
  this.disabled = false,
  this.readonly = false,
  this.plainText = false,
  this.placeholder,
  this.keyboardType,
  this.obscureText = false,
  this.maxLines = 1,
  this.minLines,
  this.focusNode,
  this.onChanged,
  this.onFieldSubmitted,
  this.validationState,
  this.customBorderRadius,
  super.validator,
  super.onSaved,
  super.autovalidateMode,
}) : super(
       initialValue: controller != null
           ? controller.text
           : (initialValue ?? ''),
       builder: (FormFieldState<String> field) {
         final _BsInputState state = field as _BsInputState;
         return state._buildField();
       },
     );