I know with a ListView or SingleChildScrollView RefreshIndicator just works natively but I want to use a RefreshIndicator
Most of the other answers will work but they all have some downsides. Using a SingleChildScrollView without adjusting the height will cause the "scrolling glowing effect" to be not at the bottom of the page. Setting the height to the maximum height of the current view (by using MediaQuery or a LayoutBuilder) will solve this problem, but there will be a render overflow when your content's height is bigger than the height of the available space.
At the end, the following solution worked perfectly for me without any problems:
LayoutBuilder(
builder: (context, constraints) => RefreshIndicator(
onRefresh: _refresh,
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: constraints.maxHeight
),
child: Text("Your Widget")
)
)
),
)