bugsnag/bugsnag-flutter

Migrating from the community package

Closed this issue · 2 comments

This official package is published under the community package name and has some different API access. If you're upgrading from the community package, please use the migration guide below:

  • bugsnag_flutter/bugsnag.dart is now bugsnag_flutter/bugsnag_flutter.dart
  • 2.0.1 uses a single API key instead of platform API keys. Use ternaries like Platform.isAndroid ? androidApiKey : iosApiKey when using bugsnag.start
  • .setUser accepts a named ID instead of an unnamed ID in the first position
  • BugsnagObserver is now BugsnagNavigatorObserver
  • Bugsnag.instance is now a global bugsnag
  • Bugsnag.instance.recordError is now bugsnag.notify
  • Bugsnag.instance.recordFlutterError should be translated as bugsnag.notify(error.exception, error.stack)
  • BugsnagBreadcrumb is now BreadcrumbType

Thanks for this I've incorporated those instructions into https://github.com/bugsnag/bugsnag-flutter/blob/next/UPGRADING.MD.

Excellent, thanks @gareththackeray