debugSlowOnScreen method

Future<void> debugSlowOnScreen(
  1. Future<void> f(), {
  2. int delayMillis = 500,
})

A debugging utility which slows down every widget lookup in a test under the function f.

This only works when debugging on-screen. It can be used to make it easier to see what the test is doing. This function is not intended to help resolve subtle timing issues. If you are experiencing subtle timing issues, please review your code, and if the problem appears AFib-related, submit a bug.

Implementation

Future<void> debugSlowOnScreen(Future<void> Function() f, { int delayMillis = 500 }) async {
  slowOnScreenMillis = delayMillis;
  await f();
  slowOnScreenMillis = 0;
}