anchor.diff:            );
     }
   }
  +
  +class DummyStatefulWidget extends StatefulWidget {
  +  const DummyStatefulWidget({Key? key}) : super(key: key);
  +
  +  @override
  +  State<StatefulWidget> createState() => DummyState();
  +}
  +
  +class DummyState extends State<DummyStatefulWidget> {
  +  @override
  +  Widget build(BuildContext context) => const SizedBox.expand();
  +}
  
positive.code:       ),
      ));
  
      final State stateClosed = tester.state(find.byType(Switch));
      expect(stateClosed, isNotNull);
  
      open();
      await tester.pump(const Duration(milliseconds: 200));
      expect(find.text('Open'), findsOneWidget);
  
      final State stateOpening = tester.state(find.byType(Switch));
      expect(stateOpening, same(stateClosed));
  
      await tester.pumpAndSettle();
      expect(find.byType(Switch), findsNothing);
      expect(find.text('Open'), findsOneWidget);
      final State stateOpen = tester.state(find.byType(
        Switch,
        skipOffstage: false,
      ));
      expect(stateOpen, same(stateOpening));
  
negative.code:             return const Text('Closed');
            },
            openBuilder: (BuildContext context, VoidCallback action) {
              return const DummyStatefulWidget();
            },
          ),
        ),
  