AnimatedSearch constructor

const AnimatedSearch({
  1. Key? key,
  2. double width = 0.7,
  3. TextEditingController? textEditingController,
  4. IconData? startIcon = Icons.search,
  5. IconData? closeIcon = Icons.close,
  6. Color? iconColor = Colors.white,
  7. Color? cursorColor = Colors.white,
  8. dynamic onChanged(
    1. String
    )?,
  9. InputDecoration? decoration,
})

Creates an AnimatedSearch widget.

The width parameter is the width of the search box when expanded.

The textEditingController parameter is the controller for the TextField.

The startIcon parameter is the icon displayed when the search box is folded.

The closeIcon parameter is the icon displayed when the search box is expanded.

The iconColor parameter is the color of the search icons.

The cursorColor parameter is the color of the cursor in the TextField.

The onChanged parameter is a callback that is called when the text in the TextField changes.

The decoration parameter is the decoration for the TextField.

Implementation

const AnimatedSearch({
  Key? key,
  this.width = 0.7,
  this.textEditingController,
  this.startIcon = Icons.search,
  this.closeIcon = Icons.close,
  this.iconColor = Colors.white,
  this.cursorColor = Colors.white,
  this.onChanged,
  this.decoration,
}) : super(key: key);