instabug_flutter 0.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

Instabug for Flutter #

A Flutter plugin for Instabug.

⚠️ This plugin is currently under active development and is not ready for production use yet. If you'd like to give us feedback or create a pull request, we would highly appreciate it!

Available Features #

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

APIs #

The table below contains a list of APIs we're planning to implement for our 1.0 release. We'll add the Dart API methods as we implement them.

API MethodNative Equivalent (Android/iOS)
Instabug.start(String token, List<InvocationEvent> invocationEvents)new Instabug.Builder(this, "APP_TOKEN").build()
+ [Instabug startWithToken:invocationEvents:]
Instabug.showWelcomeMessageWithMode(WelcomeMessageMode welcomeMessageMode)Instabug.showWelcomeMessage(WelcomeMessage.State state)
+ [Instabug showWelcomeMessageWithMode:]
Instabug.identifyUserWithEmail(String email, [String name])Instabug.identifyUser(String username, String email)
+ [Instabug identifyUserWithEmail:name:]
Instabug.logOut()Instabug.logoutUser()
+ [Instabug logOut]
Instabug.setLocale(Locale locale)Instabug.setLocale(Locale locale)
+ [Instabug setLocale:]
Instabug.setColorTheme(ColorTheme colorTheme)Instabug.setColorTheme(InstabugColorTheme theme)
+ [Instabug setColorTheme:]
Instabug.appendTags(List<String> tags)Instabug.addTags(String... tags)
+ [Instabug appendTags:]
Instabug.resetTags()Instabug.resetTags()
+ [Instabug resetTags]
Instabug.getTags()Instabug.getTags()
+ [Instabug getTags]
Instabug.setStringForKey(String value, String key)Instabug.setCustomTextPlaceHolders(InstabugCustomTextPlaceHolder placeholder)
+ [Instabug setValue:forStringWithKey:]
Instabug.setUserAttributeWithKey(String value, String key)Instabug.setUserAttribute(String key, String value)
+ [Instabug setUserAttribute:withKey:]
Instabug.getUserAttributeForKey(Sring Key)Instabug.getUserAttribute(String key)
+ [Instabug userAttributeForKey:]
Instabug.removeUserAttributeForKey(String key)Instabug.removeUserAttribute(String key)
+ [Instabug removeUserAttributeForKey:]
Instabug.getUserAttributes()Instabug.getAllUserAttributes()
+ [Instabug userAttributes:]
Instabug.logUserEventWithName(String name)Instabug.logUserEvent(String name)
+ [Instabug logUserEventWithName:]
Instabug.show()Instabug.show()
+ [Instabug show]
Instabug.invokeWithMode(InvocationMode invocationMode, [List<InvocationOption> invocationOptions])BugReporting.invoke(InvocationMode mode, @InvocationOption int... options)
+ [IBGBugReporting invokeWithMode:options:]
Instabug.logDebug(String message)InstabugLog.d(String message)
+ [IBGLog logDebug:]
Instabug.logVerbose(String message)InstabugLog.v(String message)
+ [IBGLog logVerbose:]
Instabug.logInfo(String message)InstabugLog.i(String message)
+ [IBGLog logInfo:]
Instabug.logWarn(String message)InstabugLog.w(String message)
+ [IBGLog logWarn:]
Instabug.logError(String message)InstabugLog.e(String message)
+ [IBGLog logError:]
Instabug.clearAllLogs(String message)Instabug.clearLogs()
+ [IBGLog clearAllLogs:]

Integration #

Creating a Flutter app on the Instabug dashboard isn't possible yet. Create a React Native app instead.

Installation #

  1. Add Instabug to your pubspec.yaml file.
dependencies:
    instabug_flutter:
  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_flutter.dart';
  1. Initialize the SDK in initState(). This line enables the SDK with the default behavior and sets it to be shown when the devices is shaken.
InstabugFlutter.start('APP_TOKEN', [InvocationEvent.shake]);

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.
<application
    android:name=".CustomFlutterApplication"
    ...
</application>
  1. In your newly created CustomFlutterApplication class, override onCreate() and add the following code.
ArrayList<String> invocationEvents = new ArrayList<>();
invocationEvents.add(InstabugFlutterPlugin.INVOCATION_EVENT_SHAKE);
new InstabugFlutterPlugin().start(CustomFlutterApplication.this, "APP_TOKEN", invocationEvents);
  1. For iOS apps, Instabug needs access to the microphone and photo library to be able to let users add audio and video attachments. 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.

Version 0.0.1 (2019-03-07) #

Adds the following APIs:

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

example/README.md

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:


dependencies:
  instabug_flutter: ^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:instabug_flutter/instabug_flutter.dart';
  
Version Uploaded Documentation Archive
0.0.2 Mar 20, 2019 Go to the documentation of instabug_flutter 0.0.2 Download instabug_flutter 0.0.2 archive
0.0.1 Mar 19, 2019 Go to the documentation of instabug_flutter 0.0.1 Download instabug_flutter 0.0.1 archive
1.0.1-beta.1 May 23, 2019 Go to the documentation of instabug_flutter 1.0.1-beta.1 Download instabug_flutter 1.0.1-beta.1 archive
1.0.0-beta.1 Apr 16, 2019 Go to the documentation of instabug_flutter 1.0.0-beta.1 Download instabug_flutter 1.0.0-beta.1 archive
0.0.4-alpha.1 Apr 14, 2019 Go to the documentation of instabug_flutter 0.0.4-alpha.1 Download instabug_flutter 0.0.4-alpha.1 archive
0.0.3-alpha.1 Mar 21, 2019 Go to the documentation of instabug_flutter 0.0.3-alpha.1 Download instabug_flutter 0.0.3-alpha.1 archive
0.0.1-alpha.1 Mar 10, 2019 Go to the documentation of instabug_flutter 0.0.1-alpha.1 Download instabug_flutter 0.0.1-alpha.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
68
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
75
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/instabug_flutter.dart.

Run flutter format to format lib/instabug_flutter.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

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.

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.

Dependencies

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
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test