feat(garage): add pull-to-refresh for collection gallery sync

- Wrap garage grid in RefreshIndicator
- Trigger full paged reload on pull gesture
- Use always-scrollable physics so refresh works even on short lists
- Improve manual sync flow for shared collection updates
This commit is contained in:
Lukas Müllner 2026-03-04 11:10:47 +01:00
parent b0b053ed80
commit 4ba1fe19cc

View file

@ -143,9 +143,12 @@ class GarageScreenState extends State<GarageScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: CustomScrollView( body: RefreshIndicator(
controller: _scrollController, onRefresh: () => _loadCars(reset: true),
slivers: [ child: CustomScrollView(
controller: _scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
SliverAppBar( SliverAppBar(
expandedHeight: 140, expandedHeight: 140,
pinned: true, pinned: true,
@ -297,7 +300,8 @@ class GarageScreenState extends State<GarageScreen> {
child: Center(child: CircularProgressIndicator(strokeWidth: 2)), child: Center(child: CircularProgressIndicator(strokeWidth: 2)),
), ),
), ),
], ],
),
), ),
bottomNavigationBar: _selectionMode bottomNavigationBar: _selectionMode
? SafeArea( ? SafeArea(