mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
feat: haptic feedback on long press and reordering actions
This commit is contained in:
parent
eb7477273f
commit
6242200905
@ -210,6 +210,12 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
itemCount: tracks.length,
|
itemCount: tracks.length,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
buildDefaultDragHandles: false,
|
buildDefaultDragHandles: false,
|
||||||
|
onReorderStart: (index) {
|
||||||
|
HapticFeedback.selectionClick();
|
||||||
|
},
|
||||||
|
onReorderEnd: (index) {
|
||||||
|
HapticFeedback.selectionClick();
|
||||||
|
},
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
final track = tracks.elementAt(i);
|
final track = tracks.elementAt(i);
|
||||||
return AutoScrollTag(
|
return AutoScrollTag(
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:fuzzywuzzy/fuzzywuzzy.dart';
|
import 'package:fuzzywuzzy/fuzzywuzzy.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
@ -116,6 +117,7 @@ class TrackViewBodySection extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
trackViewState.selectTrack(track.id!);
|
trackViewState.selectTrack(track.id!);
|
||||||
|
HapticFeedback.selectionClick();
|
||||||
},
|
},
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
if (trackViewState.isSelecting) {
|
if (trackViewState.isSelecting) {
|
||||||
|
Loading…
Reference in New Issue
Block a user