TopSearchBar
Deprecated
Renamed to `AppBarWithSearch`
Replace with
AppBarWithSearch(state, inputField, modifier, navigationIcon, actions, shape colors, tonalElevation, windowInsets, scrollBehavior)A search bar represents a field that allows users to enter a keyword or phrase and get relevant information. It can be used as a way to navigate through an app via search queries.

A TopSearchBar is a SearchBar with additional handling for top app bar behavior, such as window insets and scrolling. Using a TopSearchBar as the top bar of a Scaffold ensures that the search bar remains at the top of the screen. Like with SearchBar, TopSearchBar should be used in conjunction with an ExpandedFullScreenSearchBar or ExpandedDockedSearchBar to display search results when expanded.
Parameters
the state of the search bar. This state should also be passed to the inputField and the expanded search bar.
the input field of this search bar that allows entering a query, typically a SearchBarDefaults.InputField.
the Modifier to be applied to this search bar when collapsed.
the shape of this search bar when collapsed.
SearchBarColors that will be used to resolve the colors used for this search bar in different states. See SearchBarDefaults.colors.
when SearchBarColors.containerColor is ColorScheme.surface, a translucent primary color overlay is applied on top of the container. A higher tonal elevation value will result in a darker color in light theme and lighter color in dark theme. See also: Surface.
the elevation for the shadow below this search bar.
the window insets that the search bar will respect when collapsed.
a SearchBarScrollBehavior which works in conjunction with a scrolled content to change the search bar appearance as the content scrolls. If null, the search bar will not automatically react to scrolling.