Answers for "refresh indicator not working flutter"


refresh indicator not working flutter

By design, RefreshIndicator works with ListView.

    onRefresh: _onRefresh,
    child: ListView(
      padding: EdgeInsets.all(8.0),
      physics: const BouncingScrollPhysics(
      	parent: AlwaysScrollableScrollPhysics(),
      children: {
        return ListTile(
          title: Text("Item $i"),

Using AlwaysScrollableScrollPhysics() will ensure that the scroll view is always
scrollable and, therefore, can trigger the RefreshIndicator.

Right now I think Create the scroll physics with 
BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics) and not just 
AlwaysScrollableScrollPhysics() scroll physics. Because BouncingScrollPhysics 
works for short lists for bounce. Now AlwaysScrollableScrollPhysics is required
to be included for the expected behaviour.
Posted by: Guest on April-09-2021

Code answers related to "refresh indicator not working flutter"

Browse Popular Code Answers by Language