How to fade in/out a widget from SliverAppBar while scrolling?

后端 未结 2 1101
情深已故
情深已故 2021-02-04 08:28

I want to \'fade in\' and \'fade out\' a widget from SliverAppBar when user scrolls on the screen.

This is an example of what I want to do:

Here is my c

2条回答
  •  醉话见心
    2021-02-04 08:56

    This is actually quite simple using ScrollController and the Opacity Widget. Here's a basic example:

    https://gist.github.com/smkhalsa/ec33ec61993f29865a52a40fff4b81a2

提交回复
热议问题