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. TextStyle buttonTextStyle = const TextStyle(fontSize: 16.0, color: Colors.white),
  12. Axis? direction,
  13. MainAxisAlignment? mainAxisAlignment,
  14. TextInputType? keyboardType,
  15. List<TextInputFormatter>? inputFormatter,
  16. FocusNode? focusNode,
  17. Widget? prefixIcon,
  18. Widget? suffixIcon,
  19. dynamic controller,
  20. required dynamic onPressed(
    1. String b
    ),
  21. 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.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;
}