FlutterError.onError is for Flutter-specific errors (e.g., widget rendering errors, state management issues, etc.).
PlatformDispatcher.instance.onError is for errors originating from the platform side, including Dart VM errors and native code crashes.