peng8350 / flutter_pulltorefresh

a widget provided to the flutter scroll component drop-down refresh and pull up load.
MIT License
2.7k stars 721 forks source link

能否把child嵌套在Stack里面? #532

Open ghost opened 3 years ago

ghost commented 3 years ago

我要在滑动组件的上面始终覆盖一个组件不跟随滑动 比如回到顶部

ghost commented 3 years ago

image 我在SmartRefresher外面嵌套了一个Container然后抛出了断言

The following assertion was thrown building Container:
Don't use one refreshController to multiple SmartRefresher,It will cause some unexpected bugs mostly in TabBarView
'package:pull_to_refresh/src/smart_refresher.dart':
Failed assertion: line 608 pos 12: '_refresherState == null'
ghost commented 3 years ago

image 我在SmartRefresher外面嵌套了一个Container然后抛出了断言

The following assertion was thrown building Container:
Don't use one refreshController to multiple SmartRefresher,It will cause some unexpected bugs mostly in TabBarView
'package:pull_to_refresh/src/smart_refresher.dart':
Failed assertion: line 608 pos 12: '_refresherState == null'

我发现了不能把 SmartRefresher 嵌套在Container 之类的 StatelessWidget里 我写了一个StatefulWidget就可以了。 但是notice.md又是这样说的 image