diff --git a/packages/sort_box/analysis_options.yaml b/packages/sort_box/analysis_options.yaml index 42738314229..4db3c296b81 100644 --- a/packages/sort_box/analysis_options.yaml +++ b/packages/sort_box/analysis_options.yaml @@ -1,6 +1 @@ include: package:neon_lints/dart.yaml - -linter: - rules: - prefer_final_parameters: true - avoid_final_parameters: false diff --git a/packages/sort_box/lib/sort_box.dart b/packages/sort_box/lib/sort_box.dart index 7da6c27ffd9..121b69d8b91 100644 --- a/packages/sort_box/lib/sort_box.dart +++ b/packages/sort_box/lib/sort_box.dart @@ -32,9 +32,9 @@ class SortBox { /// /// This function sorts the input in place and a reference to it mutating the provided list. List sort( - final List input, - final Box box, [ - final Set>? presort, + List input, + Box box, [ + Set>? presort, ]) { if (input.length <= 1) { return input; @@ -46,15 +46,15 @@ class SortBox { ...?_boxes[box.property], }; - final sorted = input..sort((final item1, final item2) => _compare(item1, item2, boxes.iterator..moveNext())); + final sorted = input..sort((item1, item2) => _compare(item1, item2, boxes.iterator..moveNext())); return sorted; } int _compare( - final R item1, - final R item2, - final Iterator> iterator, + R item1, + R item2, + Iterator> iterator, ) { final box = iterator.current; final comparableGetter = _properties[box.property]!; diff --git a/packages/sort_box/test/sort_box_test.dart b/packages/sort_box/test/sort_box_test.dart index d563fe89aba..a892e3954b2 100644 --- a/packages/sort_box/test/sort_box_test.dart +++ b/packages/sort_box/test/sort_box_test.dart @@ -25,9 +25,9 @@ class Fruit { void main() { final sortBox = SortBox( { - FruitSort.alphabetical: (final fruit) => fruit.name.toLowerCase(), - FruitSort.count: (final fruit) => fruit.count, - FruitSort.price: (final fruit) => fruit.price!, + FruitSort.alphabetical: (fruit) => fruit.name.toLowerCase(), + FruitSort.count: (fruit) => fruit.count, + FruitSort.price: (fruit) => fruit.price!, }, { FruitSort.alphabetical: {