@@ -15,7 +15,6 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
1515 _initializePositions ();
1616 }
1717
18- // static double maxListItemHeight = 250.r;
1918 static double itemsPadding = 1. w;
2019 static const ThemeEnum swappingColor = ThemeEnum .redColor;
2120 static const ThemeEnum comparedColor = ThemeEnum .lightBlueColor;
@@ -27,8 +26,6 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
2726 static const int _minSize = 10 ;
2827
2928 static const Duration _defaultSpeedDuration = Duration (milliseconds: 300 );
30- // static const Duration _maxSpeedDuration = Duration(milliseconds: 3000);
31- // static const Duration _minSpeedDuration = Duration(milliseconds: 20);
3229
3330 CancelableOperation <void >? _cancelableSort;
3431
@@ -40,14 +37,12 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
4037 final screenWidth = MediaQuery .of (context).size.width;
4138 final availableWidth = screenWidth - (itemsPadding * (size - 1 ));
4239
43- // Ensure a positive width
4440 return availableWidth / size > 0 ? availableWidth / size : 1.0 ;
4541 }
4642
4743 static double calculateMaxListItemHeight (BuildContext context) {
4844 final screenHeight = MediaQuery .of (context).size.height * 0.65 ;
4945
50- // Ensure a positive width
5146 return screenHeight > 0 ? screenHeight : 1.0 ;
5247 }
5348
@@ -194,7 +189,7 @@ abstract class SortingNotifier extends StateNotifier<SortingNotifierState> {
194189 state = state.copyWith (list: list);
195190 break ;
196191
197- // i don't want to make it green while sorting and mark all of them at once as green at the end
192+ /// i don't want to make it green while sorting and mark all of them at once as green at the end
198193 case SortingStatus .sorted:
199194 case SortingStatus .none:
200195 list[step.index1] = list[step.index1].copyWith (sortedStatus: SortingStatus .none);
0 commit comments