'Mocks in flutter integration tests

I am writing an integration test in Flutter, and there is one call that I have to mock (sending an email confirmation code - can only be mocked).

Is there any way to do it? All solutions I find depend on Injection, which could be ok for unit testing, but I can't really do it, cause I am testing the whole app by calling await tester.pumpWidget(App());.

What could be a solution, I dont' wnt ot path my authentication service from App() down the tree.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source