sentry 0.0.4

  • Installing
  • Versions
  • 48 client for Dart #

Build Status

WARNING: experimental code

Use this library in your Dart programs (Flutter, command-line and (TBD) AngularDart) to report errors thrown by your program to error tracking service.

Usage #

Sign up for a account and get a DSN at

Add sentry dependency to your pubspec.yaml:

  sentry: any

In your Dart code, import package:sentry/sentry.dart and create a SentryClient using the DSN issued by

import 'package:sentry/sentry.dart';

final SentryClient sentry = new SentryClient(dsn: YOUR_DSN);

In an exception handler, call captureException():

main() async {
  try {
  } catch(error, stackTrace) {
    await sentry.captureException(
      exception: error,
      stackTrace: stackTrace,

Tips for catching errors #

  • use a try/catch block
  • create a Zone with an error handler, e.g. using runZoned
  • in Flutter, use FlutterError.onError
  • use Isolate.current.addErrorListener to capture uncaught errors in the root zone

package:sentry changelog #

0.0.3 #

  • environment attributes
  • auto-generate event_id and timestamp for events

0.0.2 #

  • parse and report stack traces
  • use x-sentry-error HTTP response header
  • gzip outgoing payloads by default

0.0.1 #

  • basic ability to send exception reports to

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  sentry: ^0.0.4

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:sentry/sentry.dart';
Version Uploaded Documentation Archive
2.2.0 Jan 9, 2019 Go to the documentation of sentry 2.2.0 Download sentry 2.2.0 archive
2.1.1 Oct 9, 2018 Go to the documentation of sentry 2.1.1 Download sentry 2.1.1 archive
2.1.0 Jul 30, 2018 Go to the documentation of sentry 2.1.0 Download sentry 2.1.0 archive
2.0.2 May 15, 2018 Go to the documentation of sentry 2.0.2 Download sentry 2.0.2 archive
2.0.1 Apr 26, 2018 Go to the documentation of sentry 2.0.1 Download sentry 2.0.1 archive
2.0.0 Mar 21, 2018 Go to the documentation of sentry 2.0.0 Download sentry 2.0.0 archive
1.0.0 Mar 21, 2018 Go to the documentation of sentry 1.0.0 Download sentry 1.0.0 archive
0.0.6 Sep 18, 2017 Go to the documentation of sentry 0.0.6 Download sentry 0.0.6 archive
0.0.5 Aug 15, 2017 Go to the documentation of sentry 0.0.5 Download sentry 0.0.5 archive
0.0.4 Aug 7, 2017 Go to the documentation of sentry 0.0.4 Download sentry 0.0.4 archive

All 13 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.