flutter_rollbar 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 66

Flutter Rollbar #

About #

Rollbar reporting for flutter

Usage #

import 'package:flutter_rollbar/flutter_rollbar.dart';

    ..accessToken = '<post_client_item token>'
    ..environment = 'local'
    ..person = RollbarPerson(id: '3', username: 'A Real Person');

        level: RollbarLogLevel.INFO,
        type: RollbarTelemetryType.LOG,
        message: 'Counter: $_counter',

Rollbar().publishReport(message: 'A Report');

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.


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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      home: MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void initState() {
      ..accessToken = '<post_client_item token>'
      ..environment = 'local'
      ..person = RollbarPerson(id: '3', username: 'A Real Person');

  void _incrementCounter() {
    setState(() {
          level: RollbarLogLevel.INFO,
          type: RollbarTelemetryType.LOG,
          message: 'Counter: $_counter',

  void _publishReport() async {
    await Rollbar().publishReport(message: 'A Report');
      context: context,
      builder: (BuildContext context) => Material(
            child: Container(
              padding: MediaQuery.of(context).padding,
              child: Text('Report Submitted!'),

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
              'You have pushed the button this many times:',
              style: Theme.of(context).textTheme.display1,
              onPressed: _publishReport,
              child: Text('Publish Report'),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),

Use this package as a library

1. Depend on it

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

  flutter_rollbar: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_rollbar/flutter_rollbar.dart';
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.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

47 out of 47 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/flutter_rollbar.dart.

Run flutter format to format lib/flutter_rollbar.dart.

Format lib/rollbar_api.dart.

Run flutter format to format lib/rollbar_api.dart.

Format lib/rollbar_types.dart.

Run flutter format to format lib/rollbar_types.dart.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (device_info, package_info).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
device_info ^0.3.0 0.3.0 0.4.1+4
flutter 0.0.0
http ^0.12.0+1 0.12.0+4
meta >=0.9.0 <2.0.0 1.1.8
package_info ^0.3.2 0.3.2+1 0.4.0+13
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
path 1.6.4
pedantic 1.9.0
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8