-
-
Couldn't load subscription status.
- Fork 101
Add support WASM for Flutter Web #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Future<R?> runTalkerZonedGuarded<R>(Talker talker, R Function() body, | ||
| void Function(Object error, StackTrace stack) onError, | ||
| {Map<Object?, Object?>? zoneValues, | ||
| ZoneSpecification? zoneSpecification, | ||
| bool catchFlutterErrors = true}) async { | ||
| _setupErrorHooks(talker, catchFlutterErrors: catchFlutterErrors); | ||
| return runZonedGuarded<R>(body, (dynamic error, StackTrace stackTrace) { | ||
| onError(error, stackTrace); | ||
| _reportError(error, stackTrace, talker); | ||
| }, zoneValues: zoneValues, zoneSpecification: zoneSpecification); | ||
| } | ||
|
|
||
| void _reportError( | ||
| dynamic error, | ||
| dynamic stackTrace, | ||
| Talker talker, { | ||
| FlutterErrorDetails? errorDetails, | ||
| }) async { | ||
| talker.error("Unhandled Exception", error, stackTrace); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this code is same for io and web realizations
Can we separate only _setupErrorHooks method to avoid repeating ща the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had to expose everything, so it can be used by the other files, i hope thats okay
i couldnt get it to work without exposing them
|
Hello @abdelaziz-mahdy ! Can you fix review issues before we merge this PR ? |
it should fix #301, but i dont have a way to be 100 % sure, since it didnt fail to compile for me without it