TextFieldWithSubmit constructor

TextFieldWithSubmit({
  1. Key? key,
  2. String hintText = 'Enter text',
  3. TextStyle hintTextStyle = const TextStyle(fontSize: 16.0),
  4. String buttonText = 'Submit',
  5. Color buttonColor = Colors.black,
  6. double buttonElevation = 4.0,
  7. InputDecoration? inputDecoration,
  8. double distanceBetweenInputAndButton = 20.0,
  9. EdgeInsets paddingBetweenButtonAndTextField = const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
  10. double borderRadius = 8.0,
  11. double? buttonHeight,
  12. double? buttonWidth,
  13. TextStyle buttonTextStyle = const TextStyle(fontSize: 16.0, color: Colors.white),
  14. Axis? direction,
  15. MainAxisAlignment? mainAxisAlignment,
  16. TextInputType? keyboardType,
  17. List<TextInputFormatter>? inputFormatter,
  18. FocusNode? focusNode,
  19. Widget? prefixIcon,
  20. Widget? suffixIcon,
  21. dynamic controller,
  22. required dynamic onPressed(
    1. String b
    ),
  23. 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;
}