From https://flutter.dev/docs/cookbook/maintenance/error-reporting,
runZoned<Future<void>>(() async {
runApp(CrashyApp());
}, onError: (error, stackTrace) {
// Whenever an error occurs, call the `_reportError` function. This sends
// Dart errors to the dev console or Sentry depending on the environment.
_reportError(error, stackTrace);
});
But My IDE said onError is decprecated.
What's the proper way to fix this? I can't any example on runZonedGuarded.
