Skip to content

Commit 351261b

Browse files
handle the height of sorting item
1 parent e0a9942 commit 351261b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/features/sorting/base/view_model/sorting_notifier.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
5959
) {
6060
final value = (calculateMaxListItemHeight(context) / size) * (itemIndex + 1);
6161
final perc = selectedAlgorithmsLength == 1
62-
? 1
63-
: selectedAlgorithmsLength <= 3
62+
? 0.95
63+
: selectedAlgorithmsLength <= 2
6464
? 0.9
65-
: selectedAlgorithmsLength <= 6
65+
: selectedAlgorithmsLength <= 4
6666
? 0.8
67-
: selectedAlgorithmsLength <= 9
67+
: selectedAlgorithmsLength <= 6
6868
? 0.7
6969
: 0.6;
7070
return value.h / selectedAlgorithmsLength * perc;
@@ -105,11 +105,11 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
105105
}
106106

107107
Future<void> cancelSorting() async {
108-
await _cancelableSort?.cancel();
108+
await _cancelableSort?.cancel();
109109
}
110110

111111
Future<void> stopSorting() async {
112-
await _cancelableSort?.cancel();
112+
await _cancelableSort?.cancel();
113113
if (_getOperation == SortingEnum.played) _setOperation = SortingEnum.stopped;
114114
}
115115

0 commit comments

Comments
 (0)