0

Stop screen on a widget test

I have a screen which contains a button,

Pressing the button will
1. call a function showloader() to show progress indicator,

2. then awaits to perform some logic.

3. Then calls function hideLoader() to hide the progress indicator.

My question is how do I perform widget test on loader, the problem is when I do tester.pump() it gives timer error and when I do tester.pumpAndSettle() it will go ahead and call hideLoader() and the indicator gets lost and finder cannot find any widget and test fails?

Is there any way of stopping a screen on execution, so that finder can find a widget?

Comments
  • 0
    It's too specific for devRant. Also, a "question" tag would make more sense.
Add Comment