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

discontinued
outdated

Sentry.io error reporting plugin for Flutter, offering tight integration with Flutter and native code.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_sentry/flutter_sentry.dart';

void main() => FlutterSentry.wrap(
      () async => runApp(MaterialApp(
        navigatorObservers: [
          FlutterSentryNavigatorObserver(
            breadcrumbs: FlutterSentry.instance.breadcrumbs,
          ),
        ],
        home: Scaffold(
          appBar: AppBar(
            title: const Text('Flutter Sentry plugin example app'),
          ),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                const RaisedButton(
                  onPressed: FlutterSentry.nativeCrash,
                  child: Text('Cause a native crash'),
                ),
                RaisedButton(
                  onPressed: () => throw Exception('Uncaught exception'),
                  child: const Text('Throw uncaught exception'),
                ),
                RaisedButton(
                  onPressed: () => FlutterSentry.instance.captureException(
                    exception: Exception('Event'),
                  ),
                  child: const Text('Report an event to Sentry.io'),
                ),
              ],
            ),
          ),
        ),
      )),
      dsn: 'https://420a0b0766e9450fbd3a456346c6eed2@sentry.io/1867468',
    );
15
likes
0
pub points
0%
popularity

Publisher

verified publisherfutureware.dev

Sentry.io error reporting plugin for Flutter, offering tight integration with Flutter and native code.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

device_info, flutter, sentry

More

Packages that depend on flutter_sentry