mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
Fixes pageview close button moving with pages
This commit is contained in:
parent
0c36eb1f8b
commit
bfab33f9d4
@ -222,19 +222,19 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: PageView.builder(
|
child: Stack(
|
||||||
physics: const BouncingScrollPhysics(
|
children: [
|
||||||
parent: AlwaysScrollableScrollPhysics(),
|
PageView.builder(
|
||||||
),
|
physics: const BouncingScrollPhysics(
|
||||||
controller: memoryAssetPageControllers[mIndex],
|
parent: AlwaysScrollableScrollPhysics(),
|
||||||
onPageChanged: onAssetChanged,
|
),
|
||||||
scrollDirection: Axis.horizontal,
|
controller: memoryAssetPageControllers[mIndex],
|
||||||
itemCount: memories[mIndex].assets.length,
|
onPageChanged: onAssetChanged,
|
||||||
itemBuilder: (context, index) {
|
scrollDirection: Axis.horizontal,
|
||||||
final asset = memories[mIndex].assets[index];
|
itemCount: memories[mIndex].assets.length,
|
||||||
return Stack(
|
itemBuilder: (context, index) {
|
||||||
children: [
|
final asset = memories[mIndex].assets[index];
|
||||||
Container(
|
return Container(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
child: MemoryCard(
|
child: MemoryCard(
|
||||||
asset: asset,
|
asset: asset,
|
||||||
@ -242,33 +242,33 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
title: memories[mIndex].title,
|
title: memories[mIndex].title,
|
||||||
showTitle: index == 0,
|
showTitle: index == 0,
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 8,
|
||||||
|
left: 8,
|
||||||
|
child: MaterialButton(
|
||||||
|
minWidth: 0,
|
||||||
|
onPressed: () {
|
||||||
|
// auto_route doesn't invoke pop scope, so
|
||||||
|
// turn off full screen mode here
|
||||||
|
// https://github.com/Milad-Akarie/auto_route_library/issues/1799
|
||||||
|
context.popRoute();
|
||||||
|
SystemChrome.setEnabledSystemUIMode(
|
||||||
|
SystemUiMode.edgeToEdge,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
shape: const CircleBorder(),
|
||||||
|
color: Colors.white.withOpacity(0.2),
|
||||||
|
elevation: 0,
|
||||||
|
child: const Icon(
|
||||||
|
Icons.close_rounded,
|
||||||
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
Positioned(
|
),
|
||||||
top: 8,
|
),
|
||||||
left: 8,
|
],
|
||||||
child: MaterialButton(
|
|
||||||
minWidth: 0,
|
|
||||||
onPressed: () {
|
|
||||||
// auto_route doesn't invoke pop scope, so
|
|
||||||
// turn off full screen mode here
|
|
||||||
// https://github.com/Milad-Akarie/auto_route_library/issues/1799
|
|
||||||
context.popRoute();
|
|
||||||
SystemChrome.setEnabledSystemUIMode(
|
|
||||||
SystemUiMode.edgeToEdge,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
shape: const CircleBorder(),
|
|
||||||
color: Colors.white.withOpacity(0.2),
|
|
||||||
elevation: 0,
|
|
||||||
child: const Icon(
|
|
||||||
Icons.close_rounded,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MemoryBottomInfo(memory: memories[mIndex]),
|
MemoryBottomInfo(memory: memories[mIndex]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user