chore: Follow up image viewer swipe
This commit is contained in:
parent
fb685c03cf
commit
f7bf273c17
1 changed files with 19 additions and 13 deletions
|
|
@ -16,7 +16,7 @@ class ImageViewerView extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final iconButtonStyle = IconButton.styleFrom(
|
final iconButtonStyle = IconButton.styleFrom(
|
||||||
backgroundColor: Colors.black.withAlpha(128),
|
backgroundColor: Colors.black.withAlpha(200),
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
);
|
);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
|
@ -96,24 +96,30 @@ class ImageViewerView extends StatelessWidget {
|
||||||
if (hovered && controller.canGoBack)
|
if (hovered && controller.canGoBack)
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: IconButton(
|
child: Padding(
|
||||||
style: iconButtonStyle,
|
padding: const EdgeInsets.all(12.0),
|
||||||
icon: const Icon(Icons.chevron_left_outlined),
|
child: IconButton(
|
||||||
onPressed: () => controller.pageController.previousPage(
|
style: iconButtonStyle,
|
||||||
duration: FluffyThemes.animationDuration,
|
icon: const Icon(Icons.chevron_left_outlined),
|
||||||
curve: FluffyThemes.animationCurve,
|
onPressed: () => controller.pageController.previousPage(
|
||||||
|
duration: FluffyThemes.animationDuration,
|
||||||
|
curve: FluffyThemes.animationCurve,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (hovered && controller.canGoNext)
|
if (hovered && controller.canGoNext)
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
child: IconButton(
|
child: Padding(
|
||||||
style: iconButtonStyle,
|
padding: const EdgeInsets.all(12.0),
|
||||||
icon: const Icon(Icons.chevron_right_outlined),
|
child: IconButton(
|
||||||
onPressed: () => controller.pageController.nextPage(
|
style: iconButtonStyle,
|
||||||
duration: FluffyThemes.animationDuration,
|
icon: const Icon(Icons.chevron_right_outlined),
|
||||||
curve: FluffyThemes.animationCurve,
|
onPressed: () => controller.pageController.nextPage(
|
||||||
|
duration: FluffyThemes.animationDuration,
|
||||||
|
curve: FluffyThemes.animationCurve,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue