Skip to content
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

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

Open
kouroku-room opened this issue Dec 24, 2024 · 1 comment

Comments

@kouroku-room
Copy link

kouroku-room 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 getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 24, 2024
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

No branches or pull requests

1 participant