From d42524450f41486ef02006eaef7bffbda9d6c436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 14 Feb 2025 13:36:28 +0100 Subject: [PATCH 1/4] added test which gets this bug --- lib/widgets/reorderable_builder.dart | 4 + .../reorderable_builder_widget_test.dart | 124 ++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/lib/widgets/reorderable_builder.dart b/lib/widgets/reorderable_builder.dart index 67e8723..8aa56e0 100644 --- a/lib/widgets/reorderable_builder.dart +++ b/lib/widgets/reorderable_builder.dart @@ -342,6 +342,10 @@ class _ReorderableBuilderState extends State> } Widget _buildItem(Widget child, int index) { + assert( + child.key is ValueKey, + 'You have to provide a unique ValueKey to every child!', + ); final reorderableEntity = reorderableItemBuilderController.buildItem( key: child.key as ValueKey, index: index, diff --git a/test/widgets/reorderable_builder_widget_test.dart b/test/widgets/reorderable_builder_widget_test.dart index cfb8458..01b9217 100644 --- a/test/widgets/reorderable_builder_widget_test.dart +++ b/test/widgets/reorderable_builder_widget_test.dart @@ -112,6 +112,51 @@ void main() { ), findsOneWidget); }); + + testWidgets( + "GIVEN [ReorderableBuilder.builder], three children, " + "then removing third child " + "WHEN moving last (second) child to the right " + "THEN should not call onReorder", (WidgetTester tester) async { + // given + const givenItems = ['item1', 'item2', 'item3']; + var onReorderCallCounter = 0; + + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: _TestReorderableBuilderBuilder1( + items: givenItems, + onCalledReorder: () { + onReorderCallCounter++; + }, + ), + ), + ), + ); + await tester.pumpAndSettle(); + await tester.tap(find.byIcon(Icons.remove)); + await tester.pumpAndSettle(); + + // when + final lastLocation = tester.getCenter(find.text(givenItems[1])); + final gesture = await tester.startGesture(lastLocation, pointer: 7); + await tester.pump(kLongPressTimeout); + await tester.pumpAndSettle(); + + await gesture.moveTo(Offset(lastLocation.dx + 80.0, lastLocation.dy)); + await tester.pump(); + + await gesture.moveTo(Offset(lastLocation.dx + 80.0, lastLocation.dy)); + await tester.pump(); + + await gesture.up(); + await tester.pump(); + await tester.pumpAndSettle(); + + // then + expect(onReorderCallCounter, equals(0)); + }); }); group('#ReorderableBuilder', () { @@ -321,3 +366,82 @@ void main() { }); }); } + +/// This test widget is testing [ReorderableBuilder.builder]. +/// +/// This widget is built for the following test case: +/// - add three children +/// - remove last child +/// - drag now the second child to the right where nothing is +/// - [onCalledReorder] shouldn't get called because there is no last item +/// +/// The issue was first discovered here: https://github.com/karvulf/flutter-reorderable-grid-view/issues/155. +class _TestReorderableBuilderBuilder1 extends StatefulWidget { + final List items; + final VoidCallback onCalledReorder; + + const _TestReorderableBuilderBuilder1({ + required this.items, + required this.onCalledReorder, + super.key, + }); + + @override + State<_TestReorderableBuilderBuilder1> createState() => + _TestReorderableBuilderBuilder1State(); +} + +class _TestReorderableBuilderBuilder1State + extends State<_TestReorderableBuilderBuilder1> { + final _scrollController = ScrollController(); + final _gridViewKey = GlobalKey(); + late var items = widget.items.toList(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + actions: [ + IconButton( + icon: const Icon(Icons.remove), + onPressed: () { + setState(() { + items = items..removeLast(); + }); + }, + ), + ], + ), + body: ReorderableBuilder.builder( + scrollController: _scrollController, + onReorder: (ReorderedListFunction reorderedListFunction) { + widget.onCalledReorder(); + setState(() { + items = reorderedListFunction(items); + }); + }, + childBuilder: (itemBuilder) { + return GridView.builder( + key: _gridViewKey, + controller: _scrollController, + itemCount: items.length, + itemBuilder: (context, index) { + return itemBuilder( + Card( + key: ValueKey(items[index]), + child: Text(items[index]), + ), + index, + ); + }, + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent( + maxCrossAxisExtent: 90, + crossAxisSpacing: 10, + mainAxisSpacing: 10, + ), + ); + }, + ), + ); + } +} From e770c3ff2ad1a42177d6099c55efb30e3d84c111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 14 Feb 2025 14:08:22 +0100 Subject: [PATCH 2/4] added itemCount --- example/lib/main.dart | 1 + .../other_examples/drag_target_example.dart | 1 + .../heavy_reorderable_builder_example.dart | 1 + .../lib/other_examples/page_view_example.dart | 1 + .../scrollable/inner_scrollable_example.dart | 1 + .../scrollable/no_scrollable_example.dart | 1 + .../scrollable/outer_scrollable_example.dart | 1 + lib/controller/reorderable_controller.dart | 7 +++++++ .../reorderable_drag_and_drop_controller.dart | 2 ++ lib/widgets/reorderable_builder.dart | 18 ++++++++++++++---- .../reorderable_builder_widget_test.dart | 6 +++--- 11 files changed, 33 insertions(+), 7 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 8123322..66183f7 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -204,6 +204,7 @@ class _MyAppState extends State { onUpdatedDraggedChild: _handleUpdatedDraggedChild, onDragEnd: _handleDragEnd, scrollController: _scrollController, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/drag_target_example.dart b/example/lib/other_examples/drag_target_example.dart index b9420f2..73e4cb9 100644 --- a/example/lib/other_examples/drag_target_example.dart +++ b/example/lib/other_examples/drag_target_example.dart @@ -58,6 +58,7 @@ class _MyAppState extends State { children = reorderedListFunction(children); }); }, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/heavy_reorderable_builder_example.dart b/example/lib/other_examples/heavy_reorderable_builder_example.dart index 9c38a29..f94cf9c 100644 --- a/example/lib/other_examples/heavy_reorderable_builder_example.dart +++ b/example/lib/other_examples/heavy_reorderable_builder_example.dart @@ -36,6 +36,7 @@ class _MyAppState extends State { _children = reorderedListFunction(_children); }); }, + itemCount: _children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/page_view_example.dart b/example/lib/other_examples/page_view_example.dart index 03d355c..4dcfa77 100644 --- a/example/lib/other_examples/page_view_example.dart +++ b/example/lib/other_examples/page_view_example.dart @@ -62,6 +62,7 @@ class _RecorderableItemState extends State { onUpdatedDraggedChild: _handleUpdatedDraggedChild, onDragEnd: _handleDragEnd, scrollController: _scrollController, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/scrollable/inner_scrollable_example.dart b/example/lib/other_examples/scrollable/inner_scrollable_example.dart index a3246da..b3e4b4c 100644 --- a/example/lib/other_examples/scrollable/inner_scrollable_example.dart +++ b/example/lib/other_examples/scrollable/inner_scrollable_example.dart @@ -36,6 +36,7 @@ class _MyAppState extends State { children = reorderedListFunction(children); }); }, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/scrollable/no_scrollable_example.dart b/example/lib/other_examples/scrollable/no_scrollable_example.dart index b079c41..b7a9150 100644 --- a/example/lib/other_examples/scrollable/no_scrollable_example.dart +++ b/example/lib/other_examples/scrollable/no_scrollable_example.dart @@ -26,6 +26,7 @@ class _MyAppState extends State { children = reorderedListFunction(children); }); }, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/example/lib/other_examples/scrollable/outer_scrollable_example.dart b/example/lib/other_examples/scrollable/outer_scrollable_example.dart index 5fb4a0e..4b36973 100644 --- a/example/lib/other_examples/scrollable/outer_scrollable_example.dart +++ b/example/lib/other_examples/scrollable/outer_scrollable_example.dart @@ -37,6 +37,7 @@ class _MyAppState extends State { }); }, reverse: reverse, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, diff --git a/lib/controller/reorderable_controller.dart b/lib/controller/reorderable_controller.dart index 7727082..33b9ac9 100644 --- a/lib/controller/reorderable_controller.dart +++ b/lib/controller/reorderable_controller.dart @@ -107,6 +107,13 @@ abstract class ReorderableController { return updatedEntity; } + /// Removes all children that have a higher position the [itemCount]. + void shortenMapsToItemCount({required int itemCount}) { + childrenKeyMap.removeWhere( + (key, value) => value.originalOrderId >= itemCount, + ); + } + /// Resets all entities in [childrenOrderMap] and [childrenKeyMap]. /// /// Clears [offsetMap] and rebuilds all entities in [childrenOrderMap] and diff --git a/lib/controller/reorderable_drag_and_drop_controller.dart b/lib/controller/reorderable_drag_and_drop_controller.dart index 4e66a38..671ee11 100644 --- a/lib/controller/reorderable_drag_and_drop_controller.dart +++ b/lib/controller/reorderable_drag_and_drop_controller.dart @@ -45,6 +45,7 @@ class ReorderableDragAndDropController extends ReorderableController { required Offset currentScrollOffset, required List lockedIndices, required bool isScrollableOutside, + required int? itemCount, }) { _releasedReorderableEntity = null; this.lockedIndices = lockedIndices; @@ -52,6 +53,7 @@ class ReorderableDragAndDropController extends ReorderableController { scrollOffset = currentScrollOffset; this.isScrollableOutside = isScrollableOutside; startDraggingScrollOffset = currentScrollOffset; + if(itemCount != null) super.shortenMapsToItemCount(itemCount: itemCount); } bool handleDragUpdate({required PointerMoveEvent pointerMoveEvent}) { diff --git a/lib/widgets/reorderable_builder.dart b/lib/widgets/reorderable_builder.dart index 8aa56e0..ce6e2b8 100644 --- a/lib/widgets/reorderable_builder.dart +++ b/lib/widgets/reorderable_builder.dart @@ -18,6 +18,9 @@ typedef ReorderedListFunction = List Function(List); typedef OnReorderCallback = void Function(ReorderedListFunction); typedef OnReorderPositions = void Function(List); typedef ItemCallback = void Function(int index); +typedef ChildBuilderFunction = Widget Function( + Widget Function(Widget child, int index) itemBuilder, +); /// Enables animated drag and drop behaviour for built widgets in [builder]. /// @@ -48,9 +51,13 @@ class ReorderableBuilder extends StatefulWidget { /// This function allows rendering all children using a builder. /// Make sure your [GridView.builder] calls [childBuilder] to return /// widgets that support animations and drag-and-drop functionality. - final Widget Function( - Widget Function(Widget child, int index) itemBuilder, - )? childBuilder; + final ChildBuilderFunction? childBuilder; + + /// The length of items that are rendered through [ReorderableBuilder.builder]. + /// + /// This count ensures that the drag and drop only happens the items in a + /// valid range and ignores any other item out of this range. + final int? itemCount; /// Specify indices for [children] that should not be draggable or movable. /// @@ -231,10 +238,12 @@ class ReorderableBuilder extends StatefulWidget { (onReorder != null || onReorderPositions != null)) || !enableDraggable), childBuilder = null, + itemCount = null, super(key: key); const ReorderableBuilder.builder({ - required this.childBuilder, + required ChildBuilderFunction this.childBuilder, + required int this.itemCount, this.scrollController, this.onReorder, this.onReorderPositions, @@ -436,6 +445,7 @@ class _ReorderableBuilderState extends State> currentScrollOffset: _scrollOffset, lockedIndices: widget.lockedIndices, isScrollableOutside: _isScrollOutside, + itemCount: widget.itemCount, ); widget.onDragStarted?.call(reorderableEntity.updatedOrderId); diff --git a/test/widgets/reorderable_builder_widget_test.dart b/test/widgets/reorderable_builder_widget_test.dart index 01b9217..240269f 100644 --- a/test/widgets/reorderable_builder_widget_test.dart +++ b/test/widgets/reorderable_builder_widget_test.dart @@ -16,6 +16,7 @@ void main() { MaterialApp( home: Scaffold( body: ReorderableBuilder.builder( + itemCount: 1, childBuilder: (itemBuilder) { return itemBuilder(const Placeholder(), 0); }, @@ -51,6 +52,7 @@ void main() { MaterialApp( home: Scaffold( body: ReorderableBuilder.builder( + itemCount: 1, childBuilder: (itemBuilder) { return SingleChildScrollView( child: itemBuilder(givenChild, 0), @@ -147,9 +149,6 @@ void main() { await gesture.moveTo(Offset(lastLocation.dx + 80.0, lastLocation.dy)); await tester.pump(); - await gesture.moveTo(Offset(lastLocation.dx + 80.0, lastLocation.dy)); - await tester.pump(); - await gesture.up(); await tester.pump(); await tester.pumpAndSettle(); @@ -414,6 +413,7 @@ class _TestReorderableBuilderBuilder1State ), body: ReorderableBuilder.builder( scrollController: _scrollController, + itemCount: items.length, onReorder: (ReorderedListFunction reorderedListFunction) { widget.onCalledReorder(); setState(() { From fc39ec4cd093f3e8f6b99ecd51924528e49120a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 14 Feb 2025 14:21:20 +0100 Subject: [PATCH 3/4] fixed tests --- CHANGELOG.md | 11 ++++++ .../reorderable_drag_and_drop_controller.dart | 2 +- ...derable_drag_and_drop_controller_test.dart | 34 ++++++++++++++++--- ...rderable_item_builder_controller_test.dart | 1 + .../reorderable_builder_widget_test.dart | 1 + ...erable_scrolling_listener_widget_test.dart | 2 ++ 6 files changed, 45 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60bcc54..c251cbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ - updated the default value of `automaticScrollExtent` to `150.0` (was `80.0` before) - updated `README` to explain when to use a `ScrollController` (related to the issue ([#152](https://github.com/karvulf/flutter-reorderable-grid-view/issues/152))) - some code refactoring +- added a new parameter `onReorderedPositions` + - this callback is similar to `onReorder` + - but in this case you can handle the reorder logic by yourself + - thanks to `FaFre` for the PR ([#153](https://github.com/karvulf/flutter-reorderable-grid-view/pull/153)) + +🐛 **Bug Fixes** +- `Reorderable.builder` had an issue when removing children and starting drag and drop + - the issue happened because the reorder was started with items out of the index + - this is fixed by adding a new parameter `itemCount` to `ReorderableBuilder.builder` + - this value is required to ensure that only the children which are rendered by the widget will used also for reordering + - thanks to `yoyoNTNU` for finding the issue ([#155](https://github.com/karvulf/flutter-reorderable-grid-view/issues/155)) ## 5.4.1 🐛 **Bug Fixes** diff --git a/lib/controller/reorderable_drag_and_drop_controller.dart b/lib/controller/reorderable_drag_and_drop_controller.dart index 671ee11..183674b 100644 --- a/lib/controller/reorderable_drag_and_drop_controller.dart +++ b/lib/controller/reorderable_drag_and_drop_controller.dart @@ -53,7 +53,7 @@ class ReorderableDragAndDropController extends ReorderableController { scrollOffset = currentScrollOffset; this.isScrollableOutside = isScrollableOutside; startDraggingScrollOffset = currentScrollOffset; - if(itemCount != null) super.shortenMapsToItemCount(itemCount: itemCount); + if (itemCount != null) super.shortenMapsToItemCount(itemCount: itemCount); } bool handleDragUpdate({required PointerMoveEvent pointerMoveEvent}) { diff --git a/test/controller/reorderable_drag_and_drop_controller_test.dart b/test/controller/reorderable_drag_and_drop_controller_test.dart index e1cd6c4..f7687a4 100644 --- a/test/controller/reorderable_drag_and_drop_controller_test.dart +++ b/test/controller/reorderable_drag_and_drop_controller_test.dart @@ -20,28 +20,49 @@ void main() { Offset currentScrollOffset = Offset.zero, List lockedIndices = const [], bool isScrollableOutside = false, + int? itemCount, }) { controller.handleDragStarted( reorderableEntity: reorderableEntity ?? reorderableBuilder.getEntity(), currentScrollOffset: currentScrollOffset, lockedIndices: lockedIndices, isScrollableOutside: isScrollableOutside, + itemCount: itemCount, ); } group('#handleDragStarted', () { test( - 'GIVEN dragged entity, offset, lockedIndices, isScrollableOutside and ' - 'childrenKeyMap has givenDraggedEntity ' + 'GIVEN dragged entity, offset, lockedIndices, isScrollableOutside, ' + 'childrenKeyMap has givenDraggedEntity and itemCount ' 'WHEN calling handleDragStarted ' - 'THEN should assign given values to expected values of controller', () { + 'THEN should assign given values to expected values of controller and' + 'should remove the children which have a higher position than the itemCount', + () { // given - final givenDraggedEntity = reorderableBuilder.getEntity(); + const givenItemCount = 1; + const givenDraggedKeyValue = 'dragged_key'; + const givenRemoveKeyValue1 = 'remove1'; + const givenRemoveKeyValue2 = 'remove2'; + final givenDraggedEntity = reorderableBuilder.getEntity( + originalOrderId: givenItemCount - 1, + key: givenDraggedKeyValue, + ); + final givenChildToRemove1 = reorderableBuilder.getEntity( + originalOrderId: givenItemCount, + key: givenRemoveKeyValue1, + ); + final givenChildToRemove2 = reorderableBuilder.getEntity( + originalOrderId: givenItemCount + 1, + key: givenRemoveKeyValue2, + ); const givenOffset = Offset(100.0, 200.0); const givenLockedIndices = [0, 1, 2, 3]; const givenIsScrollableOutside = true; - final givenDraggedKeyValue = givenDraggedEntity.key.value; + controller.childrenKeyMap[givenDraggedKeyValue] = givenDraggedEntity; + controller.childrenKeyMap[givenRemoveKeyValue1] = givenChildToRemove1; + controller.childrenKeyMap[givenRemoveKeyValue2] = givenChildToRemove2; // when controller.handleDragStarted( @@ -49,6 +70,7 @@ void main() { currentScrollOffset: givenOffset, lockedIndices: givenLockedIndices, isScrollableOutside: givenIsScrollableOutside, + itemCount: givenItemCount, ); // then @@ -58,6 +80,8 @@ void main() { expect(controller.scrollOffset, equals(givenOffset)); expect(controller.isScrollableOutside, equals(givenIsScrollableOutside)); expect(controller.startDraggingScrollOffset, equals(givenOffset)); + final expectedMap = {givenDraggedKeyValue: givenDraggedEntity}; + expect(controller.childrenKeyMap, equals(expectedMap)); }); }); diff --git a/test/controller/reorderable_item_builder_controller_test.dart b/test/controller/reorderable_item_builder_controller_test.dart index 8530ab5..f7577dc 100644 --- a/test/controller/reorderable_item_builder_controller_test.dart +++ b/test/controller/reorderable_item_builder_controller_test.dart @@ -25,6 +25,7 @@ void main() { currentScrollOffset: currentScrollOffset, lockedIndices: lockedIndices, isScrollableOutside: isScrollableOutside, + itemCount: null, ); } diff --git a/test/widgets/reorderable_builder_widget_test.dart b/test/widgets/reorderable_builder_widget_test.dart index 240269f..d698b2d 100644 --- a/test/widgets/reorderable_builder_widget_test.dart +++ b/test/widgets/reorderable_builder_widget_test.dart @@ -382,6 +382,7 @@ class _TestReorderableBuilderBuilder1 extends StatefulWidget { const _TestReorderableBuilderBuilder1({ required this.items, required this.onCalledReorder, + // ignore: unused_element super.key, }); diff --git a/test/widgets/reorderable_scrolling_listener_widget_test.dart b/test/widgets/reorderable_scrolling_listener_widget_test.dart index 95a8f16..90962cb 100644 --- a/test/widgets/reorderable_scrolling_listener_widget_test.dart +++ b/test/widgets/reorderable_scrolling_listener_widget_test.dart @@ -312,6 +312,7 @@ class _TestInnerScrollableState extends State<_TestInnerScrollable> { children = reorderedListFunction(children) as List; }); }, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, @@ -380,6 +381,7 @@ class _TestOuterScrollableState extends State<_TestOuterScrollable> { }); }, reverse: true, + itemCount: children.length, childBuilder: (itemBuilder) { return GridView.builder( key: _gridViewKey, From b953ff943885c864031462767d95dd4ff14113ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 14 Feb 2025 14:39:24 +0100 Subject: [PATCH 4/4] flutter 3.29.0 --- example/pubspec.lock | 92 +++++++++---------- pubspec.lock | 76 +++++++-------- ...rable_animated_positioned_widget_test.dart | 3 - ...imated_released_container_widget_test.dart | 3 - .../reorderable_builder_item_widget_test.dart | 2 - .../reorderable_builder_widget_test.dart | 2 - .../reorderable_init_child_widget_test.dart | 3 - ...erable_scrolling_listener_widget_test.dart | 4 - 8 files changed, 84 insertions(+), 101 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index c788b5b..53c57e4 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,42 +5,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" cupertino_icons: dependency: "direct main" description: @@ -53,18 +53,18 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" flutter: dependency: "direct main" description: flutter @@ -109,18 +109,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -157,71 +157,71 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" platform: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" process: dependency: transitive description: name: process - sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "5.0.3" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" sync_http: dependency: transitive description: @@ -234,18 +234,18 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" vector_math: dependency: transitive description: @@ -258,18 +258,18 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.1" webdriver: dependency: transitive description: name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.4" sdks: - dart: ">=3.3.1 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.lock b/pubspec.lock index e590c0d..3d26823 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,50 +5,50 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" flutter: dependency: "direct main" description: flutter @@ -71,18 +71,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -103,10 +103,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -119,71 +119,71 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" vector_math: dependency: transitive description: @@ -196,10 +196,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.1" sdks: - dart: ">=3.3.1 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.18.0-18.0.pre.54" diff --git a/test/widgets/reorderable_animated_positioned_widget_test.dart b/test/widgets/reorderable_animated_positioned_widget_test.dart index 5367621..26528d1 100644 --- a/test/widgets/reorderable_animated_positioned_widget_test.dart +++ b/test/widgets/reorderable_animated_positioned_widget_test.dart @@ -5,8 +5,6 @@ import 'package:flutter_test/flutter_test.dart'; import '../reorderable_builder.dart'; -// ignore_for_file: unused_element - void main() { final reorderableBuilder = ReorderableBuilder(); @@ -377,7 +375,6 @@ class _TestUpdateReorderableAnimatedPositioned extends StatefulWidget { required this.updatedReorderableEntity, required this.isDragging, required this.onMovingFinished, - super.key, }); @override diff --git a/test/widgets/reorderable_animated_released_container_widget_test.dart b/test/widgets/reorderable_animated_released_container_widget_test.dart index e7d4139..7235e9b 100644 --- a/test/widgets/reorderable_animated_released_container_widget_test.dart +++ b/test/widgets/reorderable_animated_released_container_widget_test.dart @@ -6,8 +6,6 @@ import 'package:flutter_test/flutter_test.dart'; import '../reorderable_builder.dart'; -// ignore_for_file: unused_element - void main() { final reorderableBuilder = ReorderableBuilder(); @@ -204,7 +202,6 @@ class _TestUpdateReorderableAnimatedReleasedContainer extends StatefulWidget { required this.scrollOffset, required this.releasedEntity, required this.updatedReleasedEntity, - super.key, }); @override diff --git a/test/widgets/reorderable_builder_item_widget_test.dart b/test/widgets/reorderable_builder_item_widget_test.dart index eaf6f93..704aee8 100644 --- a/test/widgets/reorderable_builder_item_widget_test.dart +++ b/test/widgets/reorderable_builder_item_widget_test.dart @@ -426,8 +426,6 @@ class _TestReorderableBuilderItem extends StatefulWidget { required this.reorderableEntity, required this.onUpdate, this.onMovingFinished, - // ignore: unused_element - super.key, }); @override diff --git a/test/widgets/reorderable_builder_widget_test.dart b/test/widgets/reorderable_builder_widget_test.dart index d698b2d..f6bb547 100644 --- a/test/widgets/reorderable_builder_widget_test.dart +++ b/test/widgets/reorderable_builder_widget_test.dart @@ -382,8 +382,6 @@ class _TestReorderableBuilderBuilder1 extends StatefulWidget { const _TestReorderableBuilderBuilder1({ required this.items, required this.onCalledReorder, - // ignore: unused_element - super.key, }); @override diff --git a/test/widgets/reorderable_init_child_widget_test.dart b/test/widgets/reorderable_init_child_widget_test.dart index 97a6e6c..d18bd77 100644 --- a/test/widgets/reorderable_init_child_widget_test.dart +++ b/test/widgets/reorderable_init_child_widget_test.dart @@ -5,8 +5,6 @@ import 'package:flutter_test/flutter_test.dart'; import '../reorderable_builder.dart'; -// ignore_for_file: unused_element - void main() { final reorderableBuilder = ReorderableBuilder(); @@ -175,7 +173,6 @@ class _TestUpdateReorderableInitChild extends StatefulWidget { required this.reorderableEntity, required this.updatedReorderableEntity, required this.onCreated, - super.key, }); @override diff --git a/test/widgets/reorderable_scrolling_listener_widget_test.dart b/test/widgets/reorderable_scrolling_listener_widget_test.dart index 90962cb..ee43841 100644 --- a/test/widgets/reorderable_scrolling_listener_widget_test.dart +++ b/test/widgets/reorderable_scrolling_listener_widget_test.dart @@ -288,8 +288,6 @@ class _TestInnerScrollable extends StatefulWidget { const _TestInnerScrollable({ required this.scrollController, required this.reverse, - // ignore: unused_element - super.key, }); @override @@ -347,8 +345,6 @@ class _TestOuterScrollable extends StatefulWidget { const _TestOuterScrollable({ required this.onBuilt, - // ignore: unused_element - super.key, }); @override