File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -910,8 +910,8 @@ class _ContextMenuPopupSubmenuTriggerState
910910 final loader = widget.action.loadChildSections;
911911 if (_sectionsFuture != null || loader == null ) return ;
912912 final future = () async {
913- // Paint the loading row/cursor before invoking a potentially blocking
914- // native Shell extension on the Windows platform thread .
913+ // Paint the loading row/cursor before starting a potentially slow
914+ // native Shell extension discovery .
915915 await WidgetsBinding .instance.endOfFrame;
916916 if (! mounted || ! widget.actionContext.mounted) {
917917 return const < ContextMenuSection > [];
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ void main() {
3838 folderListBloc: bloc,
3939 selectionBloc: selection,
4040 );
41+ addTearDown (() async {
42+ dragSel.dispose ();
43+ await selection.close ();
44+ width.dispose ();
45+ });
4146
4247 await tester.pumpWidget (
4348 RepaintBoundary (
@@ -90,6 +95,7 @@ void main() {
9095 final center = tester.getCenter (handle);
9196
9297 final mouse = await tester.createGesture (kind: PointerDeviceKind .mouse);
98+ addTearDown (mouse.removePointer);
9399 await mouse.addPointer (location: center);
94100 await tester.pump (const Duration (milliseconds: 300 ));
95101 await expectLater (
@@ -122,9 +128,5 @@ void main() {
122128 expect (committed, [460 ]);
123129 expect (width.value, 460 );
124130 expect (find.textContaining (' px' ), findsNothing);
125-
126- dragSel.dispose ();
127- await selection.close ();
128- width.dispose ();
129131 });
130132}
You can’t perform that action at this time.
0 commit comments