1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-30 11:28:22 +02:00

Add haptic feedback on swiping asset

This commit is contained in:
Alex Tran 2022-10-14 11:26:10 -05:00
parent 0f51a9794e
commit c88e5f9be2

View File

@ -1,5 +1,6 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_swipe_detector/flutter_swipe_detector.dart';
import 'package:hive/hive.dart';
@ -111,6 +112,9 @@ class GalleryViewerPage extends HookConsumerWidget {
: const BouncingScrollPhysics(),
itemCount: assetList.length,
scrollDirection: Axis.horizontal,
onPageChanged: (value) {
HapticFeedback.selectionClick();
},
itemBuilder: (context, index) {
initState(index);