guardx 0.0.1 copy "guardx: ^0.0.1" to clipboard
guardx: ^0.0.1 copied to clipboard

GuardX is an MVP Flutter crash logging plugin that captures errors and stores local JSON-line events.

GuardX #

GuardX is an MVP crash logging plugin for Flutter. It captures framework and async uncaught errors, enriches them with breadcrumbs/tags/user context, and stores events locally as JSON lines.

Quick Start #

import 'package:guardx/guardx.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await GuardX.init(
    config: const GuardXConfig(
      logFileName: 'guardx_events.log',
      maxBreadcrumbs: 50,
    ),
  );
  runApp(const MyApp());
}

Capture manually:

try {
  throw StateError('Example error');
} catch (error, stack) {
  await GuardX.captureException(
    error,
    stack,
    context: {'screen': 'checkout'},
  );
}

Example Screenshots #

Placeholder:

  • example/screenshots/home.png
  • example/screenshots/events.png

API Reference #

  • GuardX.init({GuardXConfig config})
  • GuardX.captureException(Object error, StackTrace stack, {Map<String, dynamic>? context})
  • GuardX.addBreadcrumb(String message, {Map<String, dynamic>? data})
  • GuardX.setUser({String? id, String? email, String? name})
  • GuardX.setTag(String key, String value)
  • GuardX.getRecentEvents({int limit = 20})
0
likes
150
points
21
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

GuardX is an MVP Flutter crash logging plugin that captures errors and stores local JSON-line events.

Repository (GitHub)
View/report issues

Topics

#crash-reporting #error-monitoring #logging #diagnostics

License

MIT (license)

Dependencies

flutter, path_provider

More

Packages that depend on guardx