flutter_forge_ops_tracker 0.1.0 copy "flutter_forge_ops_tracker: ^0.1.0" to clipboard
flutter_forge_ops_tracker: ^0.1.0 copied to clipboard

Flutter-specific automatic error capture on top of package:forge_ops_tracker -- FlutterError.onError and PlatformDispatcher.instance.onError. A separate package, not folded into forge_ops_tracker itse [...]

flutter_forge_ops_tracker #

Flutter-specific automatic error capture on top of forge_ops_tracker, the core Dart client for a private, self-hosted ForgeOps tracker instance. A separate package rather than folded into that one, specifically so a plain Dart (non-Flutter) consumer never has to pull in the Flutter SDK.

Installation #

# pubspec.yaml
dependencies:
  forge_ops_tracker: ^0.1.0
  flutter_forge_ops_tracker: ^0.1.0

Or: flutter pub add forge_ops_tracker flutter_forge_ops_tracker

Usage #

Call installFlutterErrorHandlers() once, after configuring the core client, before runApp:

import 'package:forge_ops_tracker/forge_ops_tracker.dart' as forge_ops_tracker;
import 'package:flutter_forge_ops_tracker/flutter_forge_ops_tracker.dart';

void main() {
  forge_ops_tracker.init((config) {
    config.dsn = 'https://<api_key>@your-forgeops-host/api/v1/events';
  });
  installFlutterErrorHandlers();
  runApp(MyApp());
}

This wires two Flutter-specific error paths the core client's own runGuarded helper doesn't see on its own:

  • FlutterError.onError: an error the framework itself catches while building, laying out, or painting a widget, what would otherwise render Flutter's own red "error" screen in debug mode. Chains to whatever handler was already installed rather than replacing it, so that error screen still renders exactly as it would without this package.
  • PlatformDispatcher.onError: anything that escapes the root Zone instead, an error in an async callback, a Future whose error was never caught. Reports, then preserves whatever the engine's own default behavior would otherwise be, the same "report, don't change program behavior" rule the core client's runGuarded follows for non-Flutter code.

See the core forge_ops_tracker README for configuration options, PII scrubbing, and delivery behavior, all shared with this package since it's the same client underneath.

Running the tests #

cd sdks/dart/flutter_forge_ops_tracker
flutter pub get
flutter test
flutter analyze
0
likes
140
points
68
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter-specific automatic error capture on top of package:forge_ops_tracker -- FlutterError.onError and PlatformDispatcher.instance.onError. A separate package, not folded into forge_ops_tracker itself, specifically so a plain Dart (non-Flutter) consumer of that package never has to pull in the Flutter SDK. See ../README.md's "Dependencies" section.

Homepage

Topics

#error-reporting #logging #monitoring #observability

License

MIT (license)

Dependencies

flutter, forge_ops_tracker

More

Packages that depend on flutter_forge_ops_tracker