Open HosamHasanRamadan opened 1 year ago
We can use
https://github.com/calcitem/Sanmill/commit/9de1aff2e4218875b46f083a1a5766c37d836bc3
PlatformDispatcher.instance.onError = (error, stack) {
Catcher.reportCheckedError(error, stack);
return true;
};
Starting with Flutter 3.3, apps should now use PlatformDispatcher.onError instead of running the app in a custom zone to catch errors. I believe catcher is using a custom zone to catch errors.
Release notes: https://medium.com/flutter/whats-new-in-flutter-3-3-893c7b9af1ff#:~:text=In%20this%20release%2C%20instead%20of%20using%20a%20custom%20Zone%2C%20you%20should%20catch%20all%20errors%20and%20exceptions%20by%20setting%20the%20PlatformDispatcher.onError%20callback.
The error handling page was also updated to reflect these changes: https://docs.flutter.dev/testing/errors