Skip to content

Commit 1bc1273

Browse files
cleanup code
1 parent 5da3f3a commit 1bc1273

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

lib/features/sorting/base/helper/sortable_item.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ class SortableItem {
1818
sortedStatus: sortedStatus ?? this.sortedStatus,
1919
);
2020
}
21+
22+
ThemeEnum get getColor {
23+
switch (sortedStatus) {
24+
case SortingStatus.sorted:
25+
return SortingNotifier.doneSortingColor;
26+
case SortingStatus.swiping:
27+
return SortingNotifier.swipingColor;
28+
case SortingStatus.compared:
29+
return SortingNotifier.comparedColor;
30+
default:
31+
return SortingNotifier.itemColor;
32+
}
33+
}
2134
}
2235

2336
class SortingStep {

lib/features/sorting/base/helper/sorting_enums.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ enum SortingAlgorithm {
1515

1616
enum SortingEnum { played, stopped, none }
1717

18-
enum SortingStatus { unSorted, compared, swapped, sorted, none }
18+
enum SortingStatus { unSorted, compared, swiping, swiped, sorted, none }

0 commit comments

Comments
 (0)