You can achieve this functionality using the new PinnedHeaderSliver and SliverResizingHeader widgets introduced in Flutter 3.24. These widgets allow you to design dynamic App Bars where headers can float, stay pinned, or resize as the user scrolls.
Implementation Steps:
These new widgets provide a simpler and more flexible interface compared to the existing SliverPersistentHeader and SliverAppBar.
💡 For a practical example, check out the PinnedHeaderSliver code that recreates the effect of the settings bar in iOS apps.
References: