From c88e5f9be2289072a9ec4a0099d4637ef0b77917 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 11:26:10 -0500 Subject: [PATCH] Add haptic feedback on swiping asset --- mobile/lib/modules/asset_viewer/views/gallery_viewer.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart index ab7bde1b7a..13012d6938 100644 --- a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart +++ b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart @@ -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);