inventiv_critic_flutter 0.0.5

  • Example
  • Installing
  • Versions
  • 64

critic_flutter #

This plugin allows Flutter apps to interact with the Inventiv Critic system for bug tracking and reporting. You will need to have a Critic account to properly utilize this. Please visit the Critic website for more information.

How to use #

Step 1: Initialize the Critic library using your api key:

String key = 'your api key';

Step 2: Create a new Bug Report using the .create const:

BugReport report = BugReport.create(
    description: 'description text',
    stepsToReproduce: 'steps to reproduce text',

Step 3: Attach a file, if necessary

File file = File('path to file');
report.attachments = <Attachment>[];
report.attachments.add(Attachment(name: 'test file', path: file.path));

Step 4: Use the Critic() singleton to submit your BugReport (example using Futures):

    (BugReport successfulReport) {
    }).catchError((Object error) {

Step 5: Review bugs submitted for your organization using Critic's web portal

0.0.5 #

Multiple attachments can be uploaded properly. Add battery and network connection to device status.

0.0.4 #

Added attachment support.

0.0.2 #

Cleaned up readme files for better published documents.

0.0.1 #

Initial version of the Critic integration. Supports bug reporting with custom description and steps to reproduce. All device platform information is gathered as well.


example/main.dart #

import 'package:flutter/material.dart';

import 'package:inventiv_critic_flutter/critic.dart';
import 'package:inventiv_critic_flutter/modal/bug_report.dart';

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

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

class _MyAppState extends State<MyApp> {
  TextEditingController _descriptionController = new TextEditingController(),
      _reproduceController = new TextEditingController();

  void initState() {

  void _submitReport(BuildContext context) {
    BugReport report = BugReport.create(
        description: _descriptionController.text,
        stepsToReproduce: _reproduceController.text);
    Critic().submitReport(report).then((BugReport successfulReport) {
      Scaffold.of(context).showSnackBar(new SnackBar(
        content: new Text('Bug Report has been filed, check console'),
          'Successfully logged!\ndescription: ${successfulReport.description}\nsteps to reproduce: ${successfulReport.stepsToReproduce}');
    }).catchError((Object error) {

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        body: Padding(
          padding: const EdgeInsets.all(25.0),
          child: Builder(
            builder: (context) => Column(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: <Widget>[
                    Text('Enter a description'),
                      controller: _descriptionController,
                    Text('Enter steps to reproduce'),
                      controller: _reproduceController,
                      color: Colors.grey,
                      onPressed: () {
                      child: Text('Test Submit'),

Use this package as a library

1. Depend on it

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

  inventiv_critic_flutter: ^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:inventiv_critic_flutter/api.dart';
import 'package:inventiv_critic_flutter/critic.dart';
import 'package:inventiv_critic_flutter/modal/app.dart';
import 'package:inventiv_critic_flutter/modal/bug_report.dart';
import 'package:inventiv_critic_flutter/modal/device.dart';
import 'package:inventiv_critic_flutter/modal/ping_request_modal.dart';
import 'package:inventiv_critic_flutter/modal/ping_response.dart';
import 'package:inventiv_critic_flutter/modal/report_request_modal.dart';
Version Uploaded Documentation Archive
0.0.5 Apr 5, 2019 Go to the documentation of inventiv_critic_flutter 0.0.5 Download inventiv_critic_flutter 0.0.5 archive
0.0.4 Mar 5, 2019 Go to the documentation of inventiv_critic_flutter 0.0.4 Download inventiv_critic_flutter 0.0.4 archive
0.0.3 Mar 5, 2019 Go to the documentation of inventiv_critic_flutter 0.0.3 Download inventiv_critic_flutter 0.0.3 archive
0.0.2 Dec 11, 2018 Go to the documentation of inventiv_critic_flutter 0.0.2 Download inventiv_critic_flutter 0.0.2 archive
0.0.1 Dec 11, 2018 Go to the documentation of inventiv_critic_flutter 0.0.1 Download inventiv_critic_flutter 0.0.1 archive
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 May 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.16
  • Flutter: 1.5.4-hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

103 out of 103 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.

Fix lib/api.dart. (-1.99 points)

Analysis of lib/api.dart reported 4 hints:

line 5 col 8: Unused import: 'package:device_info/device_info.dart'.

line 17 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 28 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 50 col 10: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/critic.dart.

Run flutter format to format lib/critic.dart.

Format lib/modal/app.dart.

Run flutter format to format lib/modal/app.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/modal/bug_report.dart (Run flutter format to format lib/modal/bug_report.dart.)
  • lib/modal/device.dart (Run flutter format to format lib/modal/device.dart.)
  • lib/modal/ping_request_modal.dart (Run flutter format to format lib/modal/ping_request_modal.dart.)
  • lib/modal/ping_response.dart (Run flutter format to format lib/modal/ping_response.dart.)
  • lib/modal/report_request_modal.dart (Run flutter format to format lib/modal/report_request_modal.dart.)

Maintenance suggestions

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.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
battery ^0.2.3 0.2.3 0.3.0+3
connectivity ^0.3.2 0.3.2 0.4.3+1
device_info ^0.3.0 0.3.0 0.4.0+1
dio ^2.0.18 2.1.5
flutter 0.0.0
http ^0.12.0 0.12.0+2
mime ^0.9.6+2 0.9.6+2
package_info ^0.3.2 0.3.2+1 0.4.0+3
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
cookie_jar 1.0.0
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.2
pedantic 1.7.0
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8