Flutter notifier for reporting exceptions, errors and log messages to Rollbar.
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.
- 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.
- Android: Yes
- iOS: Yes
- Web: No
- Windows: No
- macOS: No
- Linux: No
Additional platforms will be prioritized based on feedback from users.
For complete usage instructions and configuration reference, see our rollbar-flutter SDK docs.
See our Releases page for a list of all releases and changes.
If you run into any issues, please email us at support@rollbar.com.
For bug reports, please open an issue on GitHub.
rollbar-flutter is free software released under the MIT License. See LICENSE for details.