Migrating from the community package
Closed this issue · 2 comments
tshedor commented
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 nowbugsnag_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 usingbugsnag.start
.setUser
accepts a named ID instead of an unnamed ID in the first positionBugsnagObserver
is nowBugsnagNavigatorObserver
Bugsnag.instance
is now a globalbugsnag
Bugsnag.instance.recordError
is nowbugsnag.notify
Bugsnag.instance.recordFlutterError
should be translated asbugsnag.notify(error.exception, error.stack)
BugsnagBreadcrumb
is nowBreadcrumbType
gareththackeray commented
Thanks for this I've incorporated those instructions into https://github.com/bugsnag/bugsnag-flutter/blob/next/UPGRADING.MD.
tshedor commented
Excellent, thanks @gareththackeray