Describe the bug
Updating flutter to v1.17.0 (beta channel at the moment of writing) cause flutter analyze to trigger an error:
info • 'onError' is deprecated and shouldn't be used. Use runZonedGuarded instead • lib/main.dart:73:6 • deprecated_member_use
To Reproduce
Steps to reproduce the behavior:
flutter channelbetaflutter analyzeExpected behavior
The example code in the documentation should not cause any deprecation warning.
A possible fix would be to change the documentation into something like this:
runZonedGuarded(() {
runApp(
MyApp(),
);
}, (Object error, StackTrace stack) {
Crashlytics.instance.recordError(error, stack);
});
Most helpful comment
A possible fix would be to change the documentation into something like this: