what is the difference between SliverAppBar and SliverPersistentHeader in Flutter?
Asked Answered
M

1

7

What is the main difference between SliverAppBar and SliverPersistentHeader ?

What differ most in terms of their usage purpose ?

Moonmoonbeam answered 6/12, 2021 at 18:3 Comment(1)
SliverPersistentHeader can be used to create a SliverAppBar with custom behavior. Check the link for more info: youtube.com/…Femineity
S
6

SliverAppBar :

SliverAppBar is a Material Design widget in flutter which gives scrollable or collapsible app-bar. The word Sliver is given to scrollable areas here. SliverAppBar basically gives us means to create an app-bar that can change appearance, blend in the background, or even disappear as we scroll.

SliverPersistentHeader :

A sliver whose size varies when the sliver is scrolled to the edge of the viewport opposite the sliver's GrowthDirection. In the normal case of a CustomScrollView with no centered sliver, this sliver will vary its size when scrolled to the leading edge of the viewport.

See this Video also. for SliverAppBar and SliverPersistentHeader

Refer SliverAppBar here

Refer SliverPersistentHeader here

Shortcake answered 6/12, 2021 at 18:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.