In my app, I record the flutter onError to crashalytics,
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
While running the integration test, if some exceptions happens I get the below statement in the console and the test just hangs,
The following exception was thrown running a test: I/flutter (30479): A test overrode FlutterError.onError but either failed to return it to its original state, or had unexpected additional errors that it could not handle. Typically, this is caused by using expect() before restoring FlutterError.onError.
The above message in console suggests something is wrong with the onError
overriding, how do I return FlutterError.onError
to its original state as per the recommendation coming up in console.
Please note that I am using the newly recommended way for integration test,