Skip to main content

smf_firebase_crashlytics 0.4.2 copy "smf_firebase_crashlytics: ^0.4.2" to clipboard
smf_firebase_crashlytics: ^0.4.2 copied to clipboard

The SMF module of Firebase Crashlytics for the Flutter app that SMF generates. It reports the errors that the app does not handle to Firebase Crashlytics.

example/README.md

Generate a Flutter app with Firebase Crashlytics #

firebase_crashlytics is the module of the SMF CLI that reports errors to Firebase Crashlytics. Choose it with -m in a terminal:

dart pub global activate smf_flutter_cli
smf create my_app -m firebase_crashlytics

It depends on firebase_core, which sets up Firebase, so smf create adds that module too:

Adding firebase_core: a dependency of firebase_crashlytics.
Adding flutter_core: the only provider of the app entry role, which every app needs.

The module adds firebase_crashlytics to the pubspec.yaml of the app, and lib/core/crash_reporting/crashlytics_crash_reporter.dart with the reporter on FirebaseCrashlytics.instance. The crash reporting role adds lib/core/crash_reporting/crash_reporter.dart with the CrashReporter interface, createCrashReporter() and installCrashReporting(). bootstrap() starts Firebase and then installs the reporting:

Future<void> bootstrap() async {
  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
  installCrashReporting();
}

From then on, the errors of the main isolate that the app does not handle go to Crashlytics. The code of the app reports other errors with createCrashReporter().recordError(error, stackTrace).

After flutterfire configure, SMF on macOS fixes the Crashlytics build phase that the FlutterFire CLI adds, so that flutter build ipa works when the app uses Swift Package Manager.

The documentation has more on the firebase_crashlytics module and on Crashlytics and flutter build ipa.

1
likes
160
points
1.05k
downloads

Documentation

Documentation
API reference

Publisher

verified publishersaymyframe.com

Weekly Downloads

The SMF module of Firebase Crashlytics for the Flutter app that SMF generates. It reports the errors that the app does not handle to Firebase Crashlytics.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #firebase #crashlytics #crash-reporting

License

Apache-2.0 (license)

Dependencies

mason, smf_contracts, smf_firebase_core

More

Packages that depend on smf_firebase_crashlytics