I know with a ListView
or SingleChildScrollView
RefreshIndicator
just works natively but I want to use a RefreshIndicator
In ListView.builder use physics: AlwaysScrollableScrollPhysics()
Example:
RefreshIndicator(
onRefresh: () => _onRefresh(),
child: Center(
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
controller: _scrollController,
itemCount: 4,
addAutomaticKeepAlives: true,
itemBuilder: (BuildContext context, int position) {
return Text("Hello $position");
}
),
),
)