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:
parent
b0b053ed80
commit
4ba1fe19cc
1 changed files with 8 additions and 4 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue