While RefreshIndicator was previously working fine on both, mobile and web, it doesn't refresh a screen on Flutter Web anymore. It's not possible to overscroll anymore on any of my screens, even if it's a long list, where it is easily possible on the mobile version.
I noticed the problem after updating from flutter 3.3.x to 3.7.9
Here is another simplified example. On phone it works well to reload the random generated numbers, on web nothing happens:
import 'package:flutter/material.dart';
import 'dart:math';
void main() => runApp(const MyHomePage());
class MyHomePage extends StatefulWidget {
const MyHomePage({
Key? key,
}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
String title = 'Hello';
var rng = Random();
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: AppBar(
title: Text(title),
),
body: RefreshIndicator(
onRefresh: () async => setState(() {
title = 'Hey';
}),
child: ListView.builder(
physics: const AlwaysScrollableScrollPhysics(),
itemBuilder: (_, i) => Container(
padding: const EdgeInsets.all(10),
color: Colors.lightBlue,
width: double.infinity,
height: 50,
child: Text(
rng.nextInt(100).toString(),
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Colors.white,
),
),
),
itemCount: 200,
),
),
),
);
}
}
I tried to google for many hours, but didn't find any helpful information. Any ideas? Thank you
EDIT: Version by Niladri Raychaudhuri. Still the same problem