SearchBar constructor

const SearchBar(
  1. {Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. String? hintText,
  5. Widget? leading,
  6. Iterable<Widget>? trailing,
  7. GestureTapCallback? onTap,
  8. ValueChanged<String>? onChanged,
  9. ValueChanged<String>? onSubmitted,
  10. BoxConstraints? constraints,
  11. MaterialStateProperty<double?>? elevation,
  12. MaterialStateProperty<Color?>? backgroundColor,
  13. MaterialStateProperty<Color?>? shadowColor,
  14. MaterialStateProperty<Color?>? surfaceTintColor,
  15. MaterialStateProperty<Color?>? overlayColor,
  16. MaterialStateProperty<BorderSide?>? side,
  17. MaterialStateProperty<OutlinedBorder?>? shape,
  18. MaterialStateProperty<EdgeInsetsGeometry?>? padding,
  19. MaterialStateProperty<TextStyle?>? textStyle,
  20. MaterialStateProperty<TextStyle?>? hintStyle,
  21. TextCapitalization? textCapitalization,
  22. bool autoFocus = false,
  23. TextInputAction? textInputAction,
  24. TextInputType? keyboardType}
)

Creates a Material Design search bar.

Implementation

const SearchBar({
  super.key,
  this.controller,
  this.focusNode,
  this.hintText,
  this.leading,
  this.trailing,
  this.onTap,
  this.onChanged,
  this.onSubmitted,
  this.constraints,
  this.elevation,
  this.backgroundColor,
  this.shadowColor,
  this.surfaceTintColor,
  this.overlayColor,
  this.side,
  this.shape,
  this.padding,
  this.textStyle,
  this.hintStyle,
  this.textCapitalization,
  this.autoFocus = false,
  this.textInputAction,
  this.keyboardType,
});