FLUTTER ECOSYSTEM

Stacked-Org/crashlytics

一個搭配 LogOutput 使用的服務,該 LogOutput 會將所有警告記錄為非致命性崩潰報告,並將所有錯誤記錄為致命性崩潰報告。此功能使用 Firebase Crashlytics 服務。

crashlytics 專案封面
Stars
1
Forks
4
最近推送(UTC)
2026年7月14日
專案狀態
未封存
Stacked GitHub avatar
GITHUB Organization

Stacked ↗

The Flutter Framework to build production applications

South Africa官方網站 ↗
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 8 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Stacked Crashlytics Service

A service accompanied with a LogOutput that tracks all warnings as non-fatal crash reports and all errors as fatal crash reports. This makes use of the Firebase Crashlytics service.

How To use

  • In the pubspec.yaml file under dependencies add

     stacked_crashlytics: ^0.1.1
    
  • Register the service on to the locator

    • If you want to register the service
    @StackedApp(
        dependencies: [
            ...
            LazySingleton(classType: CrashlyticsService),
            ...
            ),
        ],
    )
    
    • If you are presolving into an async instance, you can use
    @StackedApp(
        dependencies: [
            ...
            Presolve(
            classType: CrashlyticsService,
            presolveUsing: CrashlyticsService.getInstance,
            ),
          ],
        )
    

    Note: Don't forget to run

    flutter pub run build_runner build --delete-conflicting-outputs

  • Add the log Output inside your logger under outputs inside multiple logger output like so

    Logger(
    ...
        output: MultipleLoggerOutput([
        ...
        CrashlyticsOutput(),
        ]),
    );