of static method

TestRunnerState? of(
  1. BuildContext context
)

Implementation

static TestRunnerState? of(BuildContext context) {
  TestRunnerState? runner;
  try {
    runner = context.findAncestorStateOfType<TestRunnerState>();
  } catch (e) {
    // no-op
  }

  return runner?.enabled == true ? runner : null;
}