ZetaTopAppBar.search constructor
- Key? key,
- bool? rounded,
- ZetaTopAppBarType type = ZetaTopAppBarType.defaultAppBar,
- bool automaticallyImplyLeading = true,
- ZetaSearchController? searchController,
- Widget? leading,
- Widget? title,
- TextStyle? titleTextStyle,
- ValueChanged<
String> ? onSearch, - String? searchHintText,
- VoidCallback? onSearchMicrophoneIconPressed,
- List<
Widget> actions = const [], - String? clearSemanticLabel,
- String? microphoneSemanticLabel,
- String? searchSemanticLabel,
- String? searchBackSemanticLabel,
Creates a ZetaTopAppBar with an expanding search field. This will append a search icon to the right of the app bar. When the search icon is pressed, the search field will expand and replace the title widget. It will replace the leading widget with a back button which closes the search field. The search field can be controlled externally by the searchController.
Implementation
const ZetaTopAppBar.search({
super.key,
super.rounded,
this.type = ZetaTopAppBarType.defaultAppBar,
this.automaticallyImplyLeading = true,
this.searchController,
this.leading,
this.title,
this.titleTextStyle,
this.onSearch,
this.searchHintText,
this.onSearchMicrophoneIconPressed,
this.actions = const [],
this.clearSemanticLabel,
this.microphoneSemanticLabel,
this.searchSemanticLabel,
this.searchBackSemanticLabel,
}) : shrinks = false,
assert(type != ZetaTopAppBarType.extended, 'Search app bars cannot be extended');