Skip to content

Commit ca82ad5

Browse files
reformat the code
1 parent 2d41143 commit ca82ad5

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class SortingNotifierState {
1919
Duration? swipeDuration,
2020
List<SortableItem>? list,
2121
Map<int, Offset>? positions,
22-
List<SortingAlgorithm>? selectedAlgorithms,
2322
SortingEnum? operationStatus,
2423
}) {
2524
return SortingNotifierState(

0 commit comments

Comments
 (0)