import 'package:flutter/material.dart'; class MyRefreshableContent extends StatelessWidget { final Future Function() onRefresh; final Widget child; const MyRefreshableContent({ Key? key, required this.onRefresh, required this.child, }) : super(key: key); @override Widget build(BuildContext context) { return RefreshIndicator( onRefresh: onRefresh, backgroundColor: Colors.red, color: Colors.white, child: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), child: child, ), ); } }