mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
Made memories full screen
This commit is contained in:
parent
b7a372c756
commit
aa90229c84
@ -33,6 +33,12 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
const bgColor = Colors.black;
|
const bgColor = Colors.black;
|
||||||
|
|
||||||
|
useEffect(() {
|
||||||
|
// Memories is an immersive activity
|
||||||
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
toNextMemory() {
|
toNextMemory() {
|
||||||
memoryPageController.nextPage(
|
memoryPageController.nextPage(
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
@ -154,7 +160,12 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
body: SafeArea(
|
body: PopScope(
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
// Remove immersive mode and go back to normal mode
|
||||||
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: PageView.builder(
|
child: PageView.builder(
|
||||||
physics: const BouncingScrollPhysics(
|
physics: const BouncingScrollPhysics(
|
||||||
parent: AlwaysScrollableScrollPhysics(),
|
parent: AlwaysScrollableScrollPhysics(),
|
||||||
@ -202,7 +213,13 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
child: MemoryCard(
|
child: MemoryCard(
|
||||||
asset: asset,
|
asset: asset,
|
||||||
onTap: () => toNextAsset(index),
|
onTap: () => toNextAsset(index),
|
||||||
onClose: () => context.popRoute(),
|
onClose: () {
|
||||||
|
// 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);
|
||||||
|
},
|
||||||
rightCornerText: assetProgress.value,
|
rightCornerText: assetProgress.value,
|
||||||
title: memories[mIndex].title,
|
title: memories[mIndex].title,
|
||||||
showTitle: index == 0,
|
showTitle: index == 0,
|
||||||
@ -218,6 +235,7 @@ class MemoryPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user