NxSearchTextField constructor

const NxSearchTextField({
  1. Key? key,
  2. dynamic onChanged(
    1. String
    )?,
  3. dynamic onSubmitted(
    1. String
    )?,
  4. dynamic onTap()?,
  5. WidgetStateProperty<Color?>? fillColor,
  6. WidgetStateProperty<TextStyle?>? textStyle,
  7. WidgetStateProperty<TextStyle?>? hintStyle,
  8. String? hintText,
  9. TextEditingController? controller,
  10. FocusNode? focusNode,
  11. double? width,
  12. double? height,
  13. WidgetStatePropertyAll<double>? elevation,
  14. Iterable<Widget>? trailing,
  15. WidgetStateProperty<BorderSide?>? side,
  16. WidgetStateProperty<OutlinedBorder?>? shape,
})

Creates a search text field.

  • onChanged - Called when the text changes
  • onSubmitted - Called when the user submits the search
  • onTap - Called when the field is tapped
  • fillColor - Background color for different states
  • textStyle - Text style for different states
  • hintStyle - Hint text style for different states
  • hintText - Placeholder text (defaults to "Search")
  • controller - For controlling the text input
  • focusNode - For controlling focus
  • width - Field width
  • height - Field height
  • elevation - Elevation for different states
  • trailing - Widgets to show after the search icon
  • side - Border style for different states
  • shape - Field shape for different states

Implementation

const NxSearchTextField({
  super.key,
  this.onChanged,
  this.onSubmitted,
  this.onTap,
  this.fillColor,
  this.textStyle,
  this.hintStyle,
  this.hintText,
  this.controller,
  this.focusNode,
  this.width,
  this.height,
  this.elevation,
  this.trailing,
  this.side,
  this.shape,
});