FccPageHeader constructor

const FccPageHeader({
  1. TextEditingController? controller,
  2. Key? key,
  3. required String title,
  4. TextStyle? titleStyle,
  5. String? subtitle,
  6. TextStyle? subtitleStyle,
  7. FccLeadingShape leadingShape = FccLeadingShape.roundedRect,
  8. IconData? leadingIcon,
  9. Color? leadingIconColor,
  10. double? leadingBackgroundOpacity,
  11. double? leadingIconSize = 28,
  12. double leadingCornerRadius = 16,
  13. Widget? leadingWidget,
  14. ValueChanged<String>? onSearchChanged,
  15. VoidCallback? onBarcodeScan,
  16. VoidCallback? onVoiceSearch,
  17. VoidCallback? onClear,
  18. ValueChanged<String>? onSubmitted,
  19. String? searchTitle,
  20. String? searchHintText,
  21. IconData? prefixIcon,
  22. bool showClearButton = true,
  23. bool enableAutoFocus = false,
  24. Color? backgroundColor,
  25. double borderRadius = 10.0,
  26. BoxBorder? customBorder,
  27. TextInputType keyboardType = TextInputType.text,
  28. Duration debounceDuration = const Duration(milliseconds: 300),
  29. String? semanticLabel,
  30. String? semanticHint,
  31. String? textFieldSemanticLabel,
  32. TextStyle? inputTextStyle,
  33. TextStyle? hintTextStyle,
  34. FocusNode? focusNode,
  35. bool isLoading = false,
  36. int? maxLines = 1,
  37. EdgeInsetsGeometry? contentPadding,
  38. List<Widget>? additionalActions,
  39. Future<List<String>> suggestionCallback(
    1. String
    )?,
  40. Widget suggestionBuilder(
    1. BuildContext,
    2. String
    )?,
  41. List<String>? recentSearches,
  42. double? maxSuggestionsHeight,
  43. ValueChanged<String>? onSuggestionSelected,
  44. bool showHeader = true,
  45. bool showSearchBar = true,
  46. String? recentSearchesTitle,
  47. String noSuggestionsText = 'No results found',
  48. bool showTextFieldBorder = true,
  49. bool use3DEffectOnTextField = true,
})

Implementation

const FccPageHeader({
  this.controller,
  super.key,
  required this.title,
  this.titleStyle,
  this.subtitle,
  this.subtitleStyle,
  this.leadingShape = FccLeadingShape.roundedRect,
  this.leadingIcon,
  this.leadingIconColor,
  this.leadingBackgroundOpacity,
  this.leadingIconSize = 28,
  this.leadingCornerRadius = 16,
  this.leadingWidget,
  this.onSearchChanged,
  this.onBarcodeScan,
  this.onVoiceSearch,
  this.onClear,
  this.onSubmitted,
  this.searchTitle,
  this.searchHintText,
  this.prefixIcon,
  this.showClearButton = true,
  this.enableAutoFocus = false,
  this.backgroundColor,
  this.borderRadius = 10.0,
  this.customBorder,
  this.keyboardType = TextInputType.text,
  this.debounceDuration = const Duration(milliseconds: 300),
  this.semanticLabel,
  this.semanticHint,
  this.textFieldSemanticLabel,
  this.inputTextStyle,
  this.hintTextStyle,
  // this.errorTextStyle,
  this.focusNode,
  this.isLoading = false,
  this.maxLines = 1,
  this.contentPadding,
  this.additionalActions,
  this.suggestionCallback,
  this.suggestionBuilder,
  this.recentSearches,
  this.maxSuggestionsHeight,
  this.onSuggestionSelected,
  this.showHeader = true,
  this.showSearchBar = true,
  this.recentSearchesTitle,
  this.noSuggestionsText = 'No results found',
  this.showTextFieldBorder = true,
  this.use3DEffectOnTextField = true,
});