FccPageHeader constructor
const
FccPageHeader({
- TextEditingController? controller,
- Key? key,
- required String title,
- TextStyle? titleStyle,
- String? subtitle,
- TextStyle? subtitleStyle,
- FccLeadingShape leadingShape = FccLeadingShape.roundedRect,
- IconData? leadingIcon,
- Color? leadingIconColor,
- double? leadingBackgroundOpacity,
- double? leadingIconSize = 28,
- double leadingCornerRadius = 16,
- Widget? leadingWidget,
- ValueChanged<
String> ? onSearchChanged, - VoidCallback? onBarcodeScan,
- VoidCallback? onVoiceSearch,
- VoidCallback? onClear,
- ValueChanged<
String> ? onSubmitted, - String? searchTitle,
- String? searchHintText,
- IconData? prefixIcon,
- bool showClearButton = true,
- bool enableAutoFocus = false,
- Color? backgroundColor,
- double borderRadius = 10.0,
- BoxBorder? customBorder,
- TextInputType keyboardType = TextInputType.text,
- Duration debounceDuration = const Duration(milliseconds: 300),
- String? semanticLabel,
- String? semanticHint,
- String? textFieldSemanticLabel,
- TextStyle? inputTextStyle,
- TextStyle? hintTextStyle,
- FocusNode? focusNode,
- bool isLoading = false,
- int? maxLines = 1,
- EdgeInsetsGeometry? contentPadding,
- List<
Widget> ? additionalActions, - Future<
List< suggestionCallback()?,String> > - Widget suggestionBuilder()?,
- List<
String> ? recentSearches, - double? maxSuggestionsHeight,
- ValueChanged<
String> ? onSuggestionSelected, - bool showHeader = true,
- bool showSearchBar = true,
- String? recentSearchesTitle,
- String noSuggestionsText = 'No results found',
- bool showTextFieldBorder = true,
- 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,
});