TextFieldSuffixButton constructor

TextFieldSuffixButton({
  1. Key? key,
  2. required TextEditingController controller,
  3. bool enablePaste = false,
  4. FocusNode? focusNode,
})

Create a TextFieldSuffixButton instance

  • controller is required, and it should be the same instance set to the field. Button use this controller to update the field text
  • enablePaste controls whether paste function is enabled, default to false.
  • focusNode is optional, if given it should be the same instance given to the text field. After set the focusNode, the button only show when the text field is focused.

Implementation

TextFieldSuffixButton({
  Key? key,
  required this.controller,
  this.enablePaste: false,
  this.focusNode,
}) : super(key: key);