Refresh indicator without scrollview

后端 未结 8 1034
失恋的感觉
失恋的感觉 2020-12-14 15:52

I know with a ListView or SingleChildScrollView RefreshIndicator just works natively but I want to use a RefreshIndicator

8条回答
  •  离开以前
    2020-12-14 16:39

    Recommend using AlwaysScrollableScrollPhysics() with RefreshIndicator because If the Scrollable might not have enough content to over-scroll, consider settings its physics property to AlwaysScrollableScrollPhysics.

    Instead of creating your own subclasses, parent can be used to combine ScrollPhysics objects of different types to get the desired scroll physics. For example:

    ListView(
      physics: const AlwaysScrollableScrollPhysics(),
      children: ...
    )
    

    Note : A RefreshIndicator can only be used with a vertical scroll view.

提交回复
热议问题