This method will call the init function inside the stateless widget. But how to emulate the call to dispose function?
var widget = StatelessWidgetExample();
await tester.pumpWidget(widget);
I also tried to emulate the removal from the tree.
await tester.pumpWidget(widget);
await tester.pumpWidget(Container());
but it didn't work