flutter_paper_trail 0.0.5

flutter_paper_trail #

Send logs to Papertrail

Usage #


import 'package:flutter_paper_trail/flutter_paper_trail.dart';

        hostName: "secret.papertrailapp.com",
        programName: "flutter-test-app",
        port: 9999,
        machineName: "Simulator(iPhone8)");
    //for machine name use Flutter DeviceInfoPlugin


FlutterPaperTrail.logError("My message");

Extra setup (when a user is logged in):


0.0.1 #

Initial release.

0.0.4 #

  • Added setUserId
  • iOS correctly using the result callback.

0.0.5 #

  • iOS plugin handler: fixed if else-if.


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

import 'package:flutter_paper_trail/flutter_paper_trail.dart';

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

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  void initState() {

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    return FlutterPaperTrail.initLogger(
        hostName: "secret.papertrailapp.com",
        programName: "flutter-test-app",
        port: 9999,
        machineName: "Simulator(iPhone8)");
    //for machine name use Flutter DeviceInfoPlugin

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        floatingActionButton: new FloatingActionButton(
          onPressed: () async {
            await FlutterPaperTrail.logError("I love logging errors on paper trail");
            await FlutterPaperTrail.logInfo("I love logging infos on paper trail");
            await FlutterPaperTrail.logWarning("I love logging warnings on paper trail");
            await FlutterPaperTrail.logDebug("I love logging debugs on paper trail");
          tooltip: 'Log to papertrail',
          child: const Icon(Icons.add),
        appBar: new AppBar(
          title: const Text('Papertrail logging example'),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text('Press the + button to test logging to Papertrail'),
                child: Text('Identify User'),
                onPressed: () {
              Text('Press the + button again after identifying the user'),

Use this package as a library

1. Depend on it

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

  flutter_paper_trail: ^0.0.5

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_paper_trail/flutter_paper_trail.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 Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/flutter_paper_trail.dart.

Run flutter format to format lib/flutter_paper_trail.dart.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance suggestions

Package is getting outdated. (-59.45 points)

The package was last published 83 weeks ago.

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.28.0 <3.0.0
flutter 0.0.0
meta ^1.0.5 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8