instabug_flutter 9.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

Instabug for Flutter #

pub package

A Flutter plugin for Instabug.

Available Features #

Bug Reporting
Crash Reporting
In-App Chat
In-App Surveys
Feature Requests
  • ✅ Stable
  • ⚙️ Under active development
  • ⚠ Not available yet

Integration #

Installation #

  1. Add Instabug to your pubspec.yaml file.
  1. Install the package by running the following command.
flutter packages get

Using Instabug #

  1. To start using Instabug, import it into your Flutter app.
import 'package:instabug_flutter/Instabug.dart';
  1. Initialize the SDK in initState(). This line enables the SDK with the default behavior and sets it to be shown when the device is shaken. Ignore this if you're building for Android only.
Instabug.start('APP_TOKEN', [InvocationEvent.shake]);
  1. Add the following Maven repository to your project level build.gradle
allprojects {
	repositories {
	    maven {
	        url ""

Make sure to replace app_token with your application token.

  1. If your app supports Android, create a new Java class that extends FlutterApplication and add it to your AndroidManifest.xml.
  1. In your newly created CustomFlutterApplication class, override onCreate() and add the following code.
ArrayList<String> invocationEvents = new ArrayList<>();
new InstabugFlutterPlugin().start(CustomFlutterApplication.this, "APP_TOKEN", invocationEvents);

Microphone and Photo Library Usage Description (iOS Only) #

Instabug needs access to the microphone and photo library to be able to let users add audio and video attachments. Starting from iOS 10, apps that don’t provide a usage description for those 2 permissions would be rejected when submitted to the App Store.

For your app not to be rejected, you’ll need to add the following 2 keys to your app’s info.plist file with text explaining to the user why those permissions are needed:

  • NSMicrophoneUsageDescription
  • NSPhotoLibraryUsageDescription

If your app doesn’t already access the microphone or photo library, we recommend using a usage description like:

  • "<app name> needs access to the microphone to be able to attach voice notes."
  • "<app name> needs access to your photo library for you to be able to attach images."

The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.

Network Logging #

You can choose to attach all your network requests to the reports being sent to the dashboard. To enable the feature when using the dart:io package HttpClient, use the custom Instabug client:

InstabugCustomHttpClient client = InstabugCustomHttpClient();

and continue to use the package normally to make your network requests:

client.getUrl(Uri.parse(URL)).then((request) async {
      var response = await request.close();

We also support the packages http and dio. For details on how to enable network logging for these external packages, refer to the Instabug Dart Http Adapter and the Instabug Dio Interceptor repositories.

Version 9.0.1 (2019-12-12) #

  • Added enum CustomTextPlaceHolderKey.reportQuestion which maps to InstabugCustomTextPlaceHolder.Key.REPORT_QUESTION on Android and kIBGAskAQuestionStringName on iOS

Version 9.0.0 (2019-12-09) #

  • Updated native SDKs to v9.0

Version 8.7.0 (2019-11-11) #

  • Updates native SDK dependencies to 8.7

Version 8.6.4 (2019-09-16) #

  • Updates native SDK dependencies to 8.6.3

Version 8.6.3 (2019-09-05) #

  • Updates native SDK dependencies to 8.6.2

Version 8.6.1 (2019-08-26) #

  • Bumps version to 8.6 to be in sync with other platforms.
  • Updates native SDK dependencies to 8.6.1.

Version 1.0.0 (2019-07-29) #

⚠️ Package on pub has been renamed to instabug_flutter the old package instabug is deprecated

Version 1.0.0-beta.5 (2019-07-22) #

  • Adds Network logging feature for the dart:io package HttpClient.
  • Fixes a linker issue on iOS when using Swift and CocoaPods.
  • Bumps native iOS and Android dependencies to version 8.5.

Version 1.0.0-beta.4 (2019-06-25) #

  • Fixes crash on Android on launching the sample app.

Version 1.0.0-beta.3 (2019-05-28) #

  • Fixes Locale enum name collision with dart.ui library. Use IBGLocale instead.

  • Updates Native SDK's to version 8.4

Version 1.0.0-beta.2 (2019-05-22) #

⚠️ Check the integration steps to add our new maven repository in android

  • Bump native SDK's to version 8.3
  • Fixes issue of manually invoking BugReporting

Version 1.0.0-beta.1 (2019-04-16) #

  • Adds New Sample App
  • Adds Replies Api mappings
  • Adds Chats Api mappings
  • Adds FeatureRequests Api mappings.

Version 0.0.4 (2019-04-14) #

  • Adds hasRespondedToSurvey API mapping.
  • Adds showSurvey API mapping.
  • Adds showSurveyIfAvailable API mapping.
  • Adds setShouldShowWelcomeScreen API mapping.
  • Adds setOnDismissCallback API mapping.
  • Adds setOnShowCallback API mapping.
  • Adds getAvailableSurveys API mapping.
  • Adds setAutoShowingEnabled API mapping.
  • Adds Surveys.setEnabled API mapping.
  • Adds showWithOptions API mapping.
  • Adds setInvocationOptions API mapping.
  • Adds setExtendedBugReportMode API mapping.
  • Adds setReportTypes API mapping.
  • Adds setEnabledAttachmentTypes API mapping.
  • Adds setInvocationEvents API mapping.
  • Adds setOnDismissCallback API mapping.
  • Adds setOnInvokeCallback API mapping.
  • Adds BugReporting.setEnabled API mapping.
  • Adds setWelcomeMessageMode API mapping.
  • Adds addFileAttachmentWithURL, addFileAttachmentWithData, clearFileAttachments API mapping.
  • Adds setUserData API mapping.
  • Adds setPrimaryColor API mapping.
  • Adds setSessionProfilerEnabled API mapping.

Version 0.0.3 (2019-03-21) #

  • Divides the library into separate modules: (Instabug, BugReporting, InstabugLog).

Version 0.0.2 (2019-03-20) #

  • Adds more API mappings.

Version 0.0.1 (2019-03-07) #

Adds the following APIs:

  • start(String token, List
  • showWelcomeMessageWithMode(WelcomeMessageMode welcomeMessageMode)


instabug_flutter_example #

Demonstrates how to use the instabug_flutter plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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

  instabug_flutter: ^9.0.1

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:instabug_flutter/BugReporting.dart';
import 'package:instabug_flutter/Chats.dart';
import 'package:instabug_flutter/FeatureRequests.dart';
import 'package:instabug_flutter/Instabug.dart';
import 'package:instabug_flutter/InstabugLog.dart';
import 'package:instabug_flutter/NetworkLogger.dart';
import 'package:instabug_flutter/Replies.dart';
import 'package:instabug_flutter/Surveys.dart';
import 'package:instabug_flutter/instabug_custom_http_client.dart';
import 'package:instabug_flutter/models/network_data.dart';
import 'package:instabug_flutter/utils/http_client_logger.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 16, 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 suggestions

Fix lib/instabug_custom_http_client.dart. (-9.54 points)

Analysis of lib/instabug_custom_http_client.dart reported 20 hints, including:

line 62 col 3: Avoid return types on setters.

line 63 col 7: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 68 col 3: Avoid return types on setters.

line 69 col 7: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 75 col 3: Avoid return types on setters.

Fix lib/NetworkLogger.dart. (-0.50 points)

Analysis of lib/NetworkLogger.dart reported 1 hint:

line 2 col 8: Unused import: 'dart:io'.

Format lib/Chats.dart.

Run flutter format to format lib/Chats.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/FeatureRequests.dart (Run flutter format to format lib/FeatureRequests.dart.)
  • lib/Replies.dart (Run flutter format to format lib/Replies.dart.)
  • lib/models/network_data.dart (Run flutter format to format lib/models/network_data.dart.)
  • lib/utils/http_client_logger.dart (Run flutter format to format lib/utils/http_client_logger.dart.)

Maintenance suggestions

The description is too long. (-10 points)

Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
mockito any