BsInput constructor

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

Creates a BsInput.

Implementation

BsInput({
  super.key,
  this.controller,
  String? initialValue,
  this.size = .md,
  this.disabled = false,
  this.readonly = false,
  this.plainText = false,
  this.floatingLabel,
  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();
       },
     );