app.main() also sets ErrorWidget.builder to its CrashScreen handler. The test binding's _verifyErrorWidgetBuilderUnset check fires when ErrorWidget.builder != its pre-test value after the test completes. Save and restore ErrorWidget.builder alongside FlutterError.onError. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>