Skip to content

Commit

Permalink
Workaround for error catching on Web
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed May 19, 2024
1 parent 139e455 commit f260326
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/core/catcher_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,18 @@ class Catcher2 implements ReportModeAction {
);
}).sendPort,
);
_runApp();
} else {
// Due to https://github.com/flutter/flutter/issues/100277
// this is still needed... As soon as proper error catching support
// for Web is implemented, this branch should be removed and just
// _runApp should be called, the same as in the other branch
// without the Isolate[...] stuff.
runZonedGuarded(_runApp, _reportError);
}
}

void _runApp() {
if (rootWidget != null) {
runApp(rootWidget!);
} else if (runAppFunction != null) {
Expand Down

0 comments on commit f260326

Please sign in to comment.