SearchField constructor
const
SearchField({
- Key? key,
- required TextEditingController controller,
- FocusNode? focusNode,
- bool animated = false,
- String? hintText,
- List<
String> hints = const [], - String? hintPrefix,
- Duration rotationDuration = const Duration(milliseconds: 1500),
- required ValueChanged<
String> onChanged, - GestureTapCallback? onTap,
Implementation
const SearchField({
super.key,
required this.controller,
this.focusNode,
this.animated = false,
this.hintText,
this.hints = const [],
this.hintPrefix,
this.rotationDuration = const Duration(milliseconds: 1500),
required this.onChanged,
this.onTap,
}) : assert(
!(animated && (hints == const [] || hintPrefix == null)),
'Hints and Hint Prefix cannot be empty for animated search field',
),
assert(
!(!animated && hintText == null),
'Hint text cannot be null for static search field',
);