Skip to content

Commit 813eace

Browse files
committed
feat: Add drag handle icon and haptic feedback to reordering book lists
1 parent 8a51c19 commit 813eace

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/ui/settings_screen/set_book_lists_order_screen.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:easy_localization/easy_localization.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:flutter/services.dart';
34
import 'package:flutter_bloc/flutter_bloc.dart';
45
import 'package:openreads/core/constants/enums/book_status.dart';
56
import 'package:openreads/generated/locale_keys.g.dart';
@@ -66,12 +67,16 @@ class SetBookListsOrderScreen extends StatelessWidget {
6667
title: Text(
6768
_getBookStatusTranslation(bookListsOrder[index]),
6869
),
70+
trailing: const Icon(Icons.drag_handle),
6971
),
7072
),
7173
],
7274
onReorder: (int oldIndex, int newIndex) => context
7375
.read<BookListsOrderCubit>()
7476
.updateOrder(oldIndex, newIndex),
77+
onReorderStart: (_) {
78+
HapticFeedback.selectionClick();
79+
},
7580
);
7681
}),
7782
),

0 commit comments

Comments
 (0)