Skip to content

Commit

Permalink
docs(crashlytics): update example (#5699)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Apr 8, 2021
1 parent 26355e6 commit b81c0a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/crashlytics/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ By overriding `FlutterError.onError` with `FirebaseCrashlytics.instance.recordFl
catch all errors that are thrown within the Flutter framework.

```dart
void main() {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
// Pass all uncaught errors from the framework to Crashlytics.
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
Expand Down

0 comments on commit b81c0a7

Please sign in to comment.