FSearch constructor
FSearch({
- Key? key,
- String? text,
- double? width,
- double? height,
- FSearchCorner? corner,
- Color? strokeColor,
- double? strokeWidth,
- FSearchCornerStyle cornerStyle = FSearchCornerStyle.round,
- Color? backgroundColor,
- Gradient? gradient,
- double? shadowBlur,
- Color? shadowColor,
- Offset? shadowOffset,
- Color? cursorColor,
- double? cursorWidth = 2.0,
- double? cursorRadius = 0.0,
- TextStyle? style,
- TextStyle? hintStyle,
- List<
Widget> ? prefixes, - List<
Widget> ? suffixes, - EdgeInsets? padding = EdgeInsets.zero,
- EdgeInsets? margin,
- List<
String> ? hints, - Duration hintSwitchDuration = const Duration(milliseconds: 3000),
- Duration hintSwitchAnimDuration = const Duration(milliseconds: 800),
- bool hintSwitchEnable = false,
- bool center = false,
- bool? stopHintSwitchOnFocus = true,
- Widget? hintPrefix,
- FSearchController? controller,
- FSearchAnimationType? hintSwitchType = FSearchAnimationType.Scroll,
- ValueChanged<
String> ? onSearch, - bool enable = true,
- VoidCallback? onTap,
Implementation
FSearch({
Key? key,
this.text,
this.width,
this.height,
this.corner,
this.strokeColor,
this.strokeWidth,
this.cornerStyle = FSearchCornerStyle.round,
this.backgroundColor,
this.gradient,
this.shadowBlur,
this.shadowColor,
this.shadowOffset,
this.cursorColor,
this.cursorWidth = 2.0,
this.cursorRadius = 0.0,
this.style,
this.hintStyle,
this.prefixes,
this.suffixes,
this.padding = EdgeInsets.zero,
this.margin,
this.hints,
this.hintSwitchDuration = const Duration(milliseconds: 3000),
this.hintSwitchAnimDuration = const Duration(milliseconds: 800),
this.hintSwitchEnable = false,
this.center = false,
this.stopHintSwitchOnFocus = true,
this.hintPrefix,
this.controller,
this.hintSwitchType = FSearchAnimationType.Scroll,
this.onSearch,
this.enable = true,
this.onTap,
}) : super(key: key);