A minimum of Flutter version of 3.10.0 is now required.
- Minimum Flutter version was bumped to 3.10.0
runApp
options have been removed fromstart
andattach
, instead simplyawait bugsnag.start
telemetry
has been made easier to control by replacing theSet<BugsnagTelemetryType>
with a newBugsnagTelemetryTypes
You no longer have to pass runApp
when calling start
and attach
. The startup code is for a Flutter-first app is therefore:
Future<void> main() async {
await bugsnag.start(apiKey: 'your-api-key');
runApp(MyApplication());
}
or for a native-first app:
Future<void> main() async {
await bugsnag.attach(
// configuration here
);
runApp(MyApplication());
}
Telemetry options have been simplified into a new dedicated type instead of being a set. To specify custom telemetry options, use:
bugsnag.start(
// other options
telemetry: const BugsnagTelemetryTypes(/* telemetry options */),
);
Flutter is now officially supported by Bugsnag! Many thanks to the community for the previous library and for allowing us to take the bugsnag_flutter
package name.
To upgrade:
bugsnag_flutter/bugsnag.dart
is nowbugsnag_flutter/bugsnag_flutter.dart
- we recommend using single Flutter project rather than separate platform projects. To continue using existing separate projects, 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