Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 2.45 KB

File metadata and controls

89 lines (60 loc) · 2.45 KB

rollbar-flutter

Flutter notifier for reporting exceptions, errors and log messages to Rollbar.

rollbar-flutter is currently in Beta. We are looking for beta-testers and feedback!

Usage

A simple usage example:

import 'package:flutter/services.dart';
import 'package:rollbar_flutter/rollbar.dart';

Future<void> main() async {
  var config = (ConfigBuilder('<YOUR ROLLBAR TOKEN HERE>')
        ..environment = 'production'
        ..codeVersion = '1.0.0'
        ..handleUncaughtErrors = true)
      .build();

  await RollbarFlutter.run(config, (_rollbar) {
    runApp(MyApp());
  });
}

class MyApp extends StatelessWidget {
  // Your application code here...
}

With this setup, rollbar-flutter will automatically catch and report any unhandled errors in your application.

You can also use the rollbar instance to explicitly report errors or messages to Rollbar:

import 'package:flutter/services.dart';
import 'package:rollbar_flutter/rollbar.dart';

Future<void> main() async {
  var config = (ConfigBuilder('<YOUR ROLLBAR TOKEN HERE>')
        ..environment = 'production'
        ..codeVersion = '1.0.0'
        ..handleUncaughtErrors = true)
      .build();

  await RollbarFlutter.run(config, (rollbar) async {
    await rollbar.infoMsg('Nothing out of the ordinary so far...');
  });
}

See the example directory for a complete example.

Compatibility

  • Flutter 1: version 1.20.4 and above
  • Flutter 2: version 2.0.5 and above

Logging version-specific issues, even outside of the supported versions, is welcome and they will be fixed whenever possible.

Platform Support

  • Android: Yes
  • iOS: Yes
  • Web: No
  • Windows: No
  • macOS: No
  • Linux: No

Additional platforms will be prioritized based on feedback from users.

Documentation

For complete usage instructions and configuration reference, see our rollbar-flutter SDK docs.

Release History & Changelog

See our Releases page for a list of all releases and changes.

Help / Support

If you run into any issues, please email us at support@rollbar.com.

For bug reports, please open an issue on GitHub.

License

rollbar-flutter is free software released under the MIT License. See LICENSE for details.