GlassLargeTitleController constructor
Creates a controller.
collapseTitleHeight — scroll distance (logical pixels) over which the
large title fully collapses. Defaults to 52.0 (iOS 26 spec). Overridden
automatically by GlassLargeTitle after its first layout.
searchBarHeight — scroll distance over which the search bar collapses
after the title collapse completes. Defaults to 44.0 (standard iOS
search bar height). Overridden automatically by GlassLargeTitle after
first layout when a searchBar is provided.
Implementation
GlassLargeTitleController({
double collapseTitleHeight = 52.0,
double searchBarHeight = 44.0,
}) : _collapseTitleHeight = collapseTitleHeight,
_searchBarHeight = searchBarHeight {
_scrollController = ScrollController();
_scrollController.addListener(_onScroll);
}