Skip to content

It contains code examples that cause syntax errors on Documents and pub.dev changelog #12213

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

Open
yamashita-room-335 opened this issue Dec 24, 2024 · 3 comments · May be fixed by #13650
Open

Comments

@yamashita-room-335
Copy link

yamashita-room-335 commented Dec 24, 2024

SDK

Flutter SDK

Description

, is missing on Sentry.runZonedGuarded()
https://docs.sentry.io/platforms/flutter/usage/
https://pub.dev/packages/sentry_flutter/changelog

now documents and pub.dev changelog

Sentry.runZonedGuarded(() async {
  WidgetsBinding.ensureInitialized();

  // Errors before init will not be handled by Sentry

  await SentryFlutter.init(
    (options) {
    ...
    },
    appRunner: () => runApp(MyApp()),
  );
} (error, stackTrace) {
  // Automatically sends errors to Sentry, no need to do any
  // captureException calls on your part.
  // On top of that, you can do your own custom stuff in this callback.
});

Suggested Solution

fixed

Sentry.runZonedGuarded(() async {
  WidgetsBinding.ensureInitialized();

  // Errors before init will not be handled by Sentry

  await SentryFlutter.init(
    (options) {
    ...
    },
    appRunner: () => runApp(MyApp()),
  );
}, (error, stackTrace) {
  // Automatically sends errors to Sentry, no need to do any
  // captureException calls on your part.
  // On top of that, you can do your own custom stuff in this callback.
});
@getsantry
Copy link
Contributor

getsantry bot commented Dec 24, 2024

Auto-routing to @getsentry/product-owners-issues for triage ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Dec 27, 2024

Routing to @getsentry/product-owners-docs for triage ⏲️

@kahest
Copy link
Member

kahest commented May 9, 2025

thanks for reporting, @yamashita-room-335! fixes are incoming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

Successfully merging a pull request may close this issue.

4 participants