TextFieldWithSubmit constructor
TextFieldWithSubmit({
- Key? key,
- String hintText = 'Enter text',
- TextStyle hintTextStyle = const TextStyle(fontSize: 16.0),
- String buttonText = 'Submit',
- Color buttonColor = Colors.black,
- double buttonElevation = 4.0,
- InputDecoration? inputDecoration,
- double distanceBetweenInputAndButton = 20.0,
- EdgeInsets paddingBetweenButtonAndTextField = const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
- double borderRadius = 8.0,
- double? buttonHeight,
- double? buttonWidth,
- TextStyle buttonTextStyle = const TextStyle(fontSize: 16.0, color: Colors.white),
- Axis? direction,
- MainAxisAlignment? mainAxisAlignment,
- TextInputType? keyboardType,
- List<
TextInputFormatter> ? inputFormatter, - FocusNode? focusNode,
- Widget? prefixIcon,
- Widget? suffixIcon,
- dynamic controller,
- required dynamic onPressed(
- String b
- required EdgeInsets padding,
Implementation
TextFieldWithSubmit({
Key? key,
this.hintText = 'Enter text',
this.hintTextStyle = const TextStyle(fontSize: 16.0),
this.buttonText = 'Submit',
this.buttonColor = Colors.black,
this.buttonElevation = 4.0,
this.inputDecoration,
this.distanceBetweenInputAndButton = 20.0,
this.paddingBetweenButtonAndTextField =
const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
this.borderRadius = 8.0,
this.buttonHeight,
this.buttonWidth,
this.buttonTextStyle = const TextStyle(fontSize: 16.0, color: Colors.white),
this.direction,
this.mainAxisAlignment,
this.keyboardType,
this.inputFormatter,
this.focusNode,
this.prefixIcon,
this.suffixIcon,
controller,
required this.onPressed,
required this.padding,
}) : super(key: key) {
this.controller = controller ?? this.controller;
}