diff --git a/CHANGELOG.md b/CHANGELOG.md
index e66f23fb2..2c296dc1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
-## Master
+## 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.
diff --git a/README.md b/README.md
index 80bd2f2d5..34d24ec21 100644
--- a/README.md
+++ b/README.md
@@ -8,15 +8,15 @@ A Flutter plugin for [Instabug](https://instabug.com/).
| Feature | Status |
|:---------------------------------------------------------:|:-------:|
-| [Bug Reporting](https://instabug.com/bug-reporting) | ⚙️ |
-| [Crash Reporting](https://instabug.com/crash-reporting) | ❌ |
-| [In-App Chat](https://instabug.com/in-app-chat) | ⚙️ |
-| [In-App Surveys](https://instabug.com/in-app-surveys) | ⚙️ |
-| [Feature Requests](https://instabug.com/feature-requests) | ⚙️ |
+| [Bug Reporting](https://instabug.com/bug-reporting) | ✅ |
+| [Crash Reporting](https://instabug.com/crash-reporting) | ⚠ |
+| [In-App Chat](https://instabug.com/in-app-chat) | ✅ |
+| [In-App Surveys](https://instabug.com/in-app-surveys) | ✅ |
+| [Feature Requests](https://instabug.com/feature-requests) | ✅ |
* ✅ Stable
* ⚙️ Under active development
-* ❌ Not available yet
+* ⚠ Not available yet
### APIs
@@ -44,7 +44,6 @@ The section below contains the APIs we're planning to implement for our 1.0 rele
| `show()` | `show()`
`+ show` |
| `setSessionProfilerEnabled(bool sessionProfilerEnabled)` | `setSessionProfilerState(Feature.State state)`
`sessionProfilerEnabled` |
| `setPrimaryColor(Color color)` | `setPrimaryColor(@ColorInt int primaryColorValue)`
`tintColor` |
-| | `onReportSubmitHandler(Report.OnReportCreatedListener listener)`
`willSendReportHandler`. |
| `setUserData(String userData)` | `setUserData(String userData)`
`userData` |
| `addFileAttachmentWithURL(String filePath, String fileName)` | `addFileAttachment(Uri fileUri, String fileNameWithExtension)`
`+ addFileAttachmentWithURL:` |
| `addFileAttachmentWithData(Uint8List data, String fileName)` | `addFileAttachment(byte[] data, String fileNameWithExtension)` `+ addFileAttachmentWithData:` |
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 0a692ee4a..a4cfb83c1 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -35,54 +35,6 @@ class _MyAppState extends State {
if (Platform.isIOS) {
Instabug.start('068ba9a8c3615035e163dc5f829c73be', [InvocationEvent.shake]);
}
- //Instabug.showWelcomeMessageWithMode(WelcomeMessageMode.beta);
- //Instabug.setWelcomeMessageMode(WelcomeMessageMode.beta);
- Instabug.identifyUser('aezz@instabug.com', 'Aly Ezz');
- InstabugLog.logInfo('Test Log Info Message from Flutter!');
- InstabugLog.logDebug('Test Debug Message from Flutter!');
- InstabugLog.logVerbose('Test Verbose Message from Flutter!');
- InstabugLog.clearAllLogs();
- InstabugLog.logError('Test Error Message from Flutter!');
- InstabugLog.logWarn('Test Warn Message from Flutter!');
- Instabug.logOut();
- //Instabug.setLocale(Locale.German);
- Instabug.setColorTheme(ColorTheme.dark);
- Instabug.appendTags(['tag1', 'tag2']);
- Instabug.setUserAttribute('19', 'Age');
- Instabug.setUserAttribute('female', 'gender');
- Instabug.removeUserAttribute('gender');
- final String value = await Instabug.getUserAttributeForKey('Age');
- print('User Attribute ' + value);
- final Map userAttributes = await Instabug.getUserAttributes();
- print(userAttributes.toString());
- Instabug.logUserEvent('Aly Event');
- Instabug.setValueForStringWithKey('What\'s the problem', IBGCustomTextPlaceHolderKey.reportBug);
- Instabug.setValueForStringWithKey('Send some ideas', IBGCustomTextPlaceHolderKey.reportFeedback);
- Instabug.setSessionProfilerEnabled(false);
- Color c = const Color.fromRGBO(255, 0, 255, 1.0);
- Instabug.setPrimaryColor(c);
- Instabug.setUserData("This is some useful data");
- var list = Uint8List(10);
- Instabug.addFileAttachmentWithData(list, "My File");
- Instabug.clearFileAttachments();
- //Instabug.clearFileAttachments();
- //BugReporting.setEnabled(false);
- BugReporting.setOnInvokeCallback(sdkInvoked);
- BugReporting.setOnDismissCallback(sdkDismissed);
- BugReporting.setInvocationEvents([InvocationEvent.floatingButton]);
- Surveys.setEnabled(true);
- Surveys.setAutoShowingEnabled(false);
- Surveys.setOnShowCallback(surveyShown);
- Surveys.setOnDismissCallback(surveyDismiss);
- //Replies.setInAppNotificationsEnabled(false);
- Replies.setEnabled(true);
- Replies.show();
- Replies.setOnNewReplyReceivedCallback(replies);
- //BugReporting.setEnabledAttachmentTypes(false, false, false, false);
- //BugReporting.setReportTypes([ReportType.FEEDBACK,ReportType.BUG]);
- //BugReporting.setExtendedBugReportMode(ExtendedBugReportMode.ENABLED_WITH_REQUIRED_FIELDS);
- //BugReporting.setInvocationOptions([InvocationOption.EMAIL_FIELD_HIDDEN]);
-
} on PlatformException {
platformVersion = 'Failed to get platform version.';
}
@@ -96,92 +48,250 @@ class _MyAppState extends State {
});
}
- void resetTags() {
- Instabug.resetTags();
+ void show() {
+ Instabug.show();
}
- void getSurveys(List surveys) {
- int x = surveys.length;
- debugPrint(x.toString());
+ void sendBugReport() {
+ BugReporting.invoke(InvocationMode.bug, [InvocationOption.emailFieldOptional]);
}
- void sdkInvoked() {
- debugPrint("I am called before invocation");
+ void sendFeedback() {
+ BugReporting.invoke(InvocationMode.feedback, [InvocationOption.emailFieldOptional]);
}
- void surveyShown() {
- debugPrint("The user will se a survey nwoww");
+ void startNewConversation () {
+ Chats.show();
}
- void surveyDismiss() {
- debugPrint("The survey is Dismissed");
+ void showNpsSurvey() {
+ Surveys.showSurvey('pcV_mE2ttqHxT1iqvBxL0w');
}
- void sdkDismissed(DismissType dismissType, ReportType reportType) {
- debugPrint('SDK Dismissed DismissType: ' + dismissType.toString());
- debugPrint('SDK Dismissed ReportType: ' + reportType.toString());
+ void showMultipleQuestionSurvey() {
+ Surveys.showSurvey('ZAKSlVz98QdPyOx1wIt8BA');
}
- void hasResponded(bool hasResponded) {
- debugPrint(hasResponded.toString());
+ void showFeatureRequests () {
+ FeatureRequests.show();
}
- void replies() {
- debugPrint("new Replyyy");
- }
- void show() {
- //Instabug.show();
- // Surveys.getAvailableSurveys(getSurveys);
- // Surveys.showSurveyIfAvailable();
- // Surveys.setShouldShowWelcomeScreen(true);
- //Surveys.showSurvey("BHJI1iaKYhr4CYHHcUAaTg");
- //BugReporting.showWithOptions(ReportType.bug, [InvocationOption.emailFieldHidden]);
- // FeatureRequests.setEmailFieldRequired(false, [ActionType.allActions]);
- // FeatureRequests.show();
- // Replies.setEnabled(true);
- // Replies.show();
- //Replies.setInAppNotificationsEnabled(false);
- //Replies.getUnreadRepliesCount(replies);
+ void setInvocationEvent(InvocationEvent invocationEvent) {
+ BugReporting.setInvocationEvents([invocationEvent]);
}
- void invokeWithMode() {
- Surveys.hasRespondedToSurvey("BHJI1iaKYhr4CYHHcUAaTg", hasResponded);
- // BugReporting.invokeWithMode(InvocationMode.bug, [InvocationOption.emailFieldHidden]);
+ void setPrimaryColor (Color c) {
+ Instabug.setPrimaryColor(c);
}
- void getTags() async {
- final List tags = await Instabug.getTags();
- print(tags.toString());
+ void setColorTheme (ColorTheme colorTheme) {
+ Instabug.setColorTheme(colorTheme);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
- appBar: AppBar(
- title: const Text('Plugin example app'),
- ),
- body: Center(
+ body: SingleChildScrollView(
+ padding: EdgeInsets.only(top: 60.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- Text('Running on: $_platformVersion\n'),
- RaisedButton(
+ Container(
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0, bottom: 20.0),
+ child : Text(
+ 'Hello Instabug\'s awesome user! The purpose of this application is to show you the different options for customizing the SDK and how easy it is to integrate it to your existing app',
+ textAlign: TextAlign.center,
+ ),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
onPressed: show,
- child: Text('show'),
+ textColor: Colors.white,
+ child: Text('Invoke'),
+ color: Colors.lightBlue),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: sendBugReport,
+ textColor: Colors.white,
+ child: Text('Send Bug Report'),
+ color: Colors.lightBlue),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: sendFeedback,
+ textColor: Colors.white,
+ child: Text('Send Feedback'),
+ color: Colors.lightBlue),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: startNewConversation,
+ textColor: Colors.white,
+ child: Text('Start a New Conversation'),
+ color: Colors.lightBlue),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: showNpsSurvey,
+ textColor: Colors.white,
+ child: Text('Show NPS Survey'),
color: Colors.lightBlue),
- RaisedButton(
- onPressed: invokeWithMode,
- child: Text('invokeWithMode'),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: showMultipleQuestionSurvey,
+ textColor: Colors.white,
+ child: Text('Show Multiple Questions Survey'),
color: Colors.lightBlue),
- RaisedButton(
- onPressed: resetTags,
- child: Text('reset tags'),
+ ),
+ Container(
+ width: double.infinity,
+ margin: const EdgeInsets.only(left: 20.0, right: 20.0),
+ // height: double.infinity,
+ child: RaisedButton(
+ onPressed: showFeatureRequests,
+ textColor: Colors.white,
+ child: Text('Show Feature Requests'),
color: Colors.lightBlue),
- RaisedButton(
- onPressed: getTags,
- child: Text('get tags'),
- color: Colors.lightBlue)
+ ),
+ Container(
+ alignment: Alignment.centerLeft,
+ margin: const EdgeInsets.only(top: 20.0, left: 20.0),
+ child : Text(
+ 'Change Invocation Event',
+ textAlign: TextAlign.left,
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ButtonBar (
+ mainAxisSize: MainAxisSize.min,
+ alignment: MainAxisAlignment.start,
+ children: [
+ RaisedButton(
+ onPressed: ()=>setInvocationEvent(InvocationEvent.none),
+ textColor: Colors.white,
+ child: Text('none'),
+ color: Colors.lightBlue),
+ RaisedButton(
+ onPressed: ()=>setInvocationEvent(InvocationEvent.shake),
+ textColor: Colors.white,
+ child: Text('Shake'),
+ color: Colors.lightBlue),
+ RaisedButton(
+ onPressed: ()=>setInvocationEvent(InvocationEvent.screenshot),
+ textColor: Colors.white,
+ child: Text('Screenshot'),
+ color: Colors.lightBlue),
+ ],
+ ),
+ ButtonBar (
+ mainAxisSize: MainAxisSize.min,
+ alignment: MainAxisAlignment.start,
+ children: [
+ RaisedButton(
+ onPressed: ()=>setInvocationEvent(InvocationEvent.floatingButton),
+ textColor: Colors.white,
+ child: Text('Floating Button'),
+ color: Colors.lightBlue),
+ RaisedButton(
+ onPressed: ()=>setInvocationEvent(InvocationEvent.twoFingersSwipeLeft),
+ textColor: Colors.white,
+ child: Text('Two Fingers Swipe Left'),
+ color: Colors.lightBlue),
+ ],
+ ),
+ Container(
+ alignment: Alignment.centerLeft,
+ margin: const EdgeInsets.only( left: 20.0),
+ child : Text(
+ 'Set Primary Color',
+ textAlign: TextAlign.left,
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ButtonBar (
+ mainAxisSize: MainAxisSize.min,
+ alignment: MainAxisAlignment.center,
+ children: [
+ ButtonTheme(
+ minWidth: 50.0,
+ height: 30.0,
+ child: RaisedButton(
+ onPressed: ()=>setPrimaryColor(Colors.red),
+ textColor: Colors.white,
+ color: Colors.red),
+ ),
+ ButtonTheme(
+ minWidth: 50.0,
+ height: 30.0,
+ child: RaisedButton(
+ onPressed: ()=>setPrimaryColor(Colors.green),
+ textColor: Colors.white,
+ color: Colors.green),
+ ),
+ ButtonTheme(
+ minWidth: 50.0,
+ height: 30.0,
+ child: RaisedButton(
+ onPressed: ()=>setPrimaryColor(Colors.blue),
+ textColor: Colors.white,
+ color: Colors.blue),
+ ),
+ ButtonTheme(
+ minWidth: 50.0,
+ height: 30.0,
+ child: RaisedButton(
+ onPressed: ()=>setPrimaryColor(Colors.yellow),
+ textColor: Colors.white,
+ color: Colors.yellow),
+ ),
+ ],
+ ),
+ Container(
+ alignment: Alignment.centerLeft,
+ margin: const EdgeInsets.only( left: 20.0),
+ child : Text(
+ 'Color Theme',
+ textAlign: TextAlign.left,
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ButtonBar (
+ mainAxisSize: MainAxisSize.max,
+ alignment: MainAxisAlignment.center,
+ children: [
+ RaisedButton(
+ onPressed: ()=> setColorTheme(ColorTheme.light),
+ textColor: Colors.lightBlue,
+ child: Text('Light'),
+ color: Colors.white),
+ RaisedButton(
+ onPressed: ()=> setColorTheme(ColorTheme.dark),
+ textColor: Colors.white,
+ child: Text('Dark'),
+ color: Colors.black),
+ ],
+ ),
],
)),
),
diff --git a/pubspec.yaml b/pubspec.yaml
index dd82c0dec..e821bedb1 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: instabug_flutter
-version: 0.0.4-alpha.1
+version: 1.0.0-beta.1
description: >-
Instabug is an in-app feedback and bug reporting tool for mobile apps.
With just a simple shake, your users or beta testers can report bugs or
@@ -22,46 +22,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
-# For information on the generic Dart part of this file, see the
-# following page: https://www.dartlang.org/tools/pub/pubspec
-
-# The following section is specific to Flutter.
flutter:
- # This section identifies this Flutter project as a plugin project.
- # The androidPackage and pluginClass identifiers should not ordinarily
- # be modified. They are used by the tooling to maintain consistency when
- # adding or updating assets for this project.
plugin:
androidPackage: com.instabug.instabugflutter
pluginClass: InstabugFlutterPlugin
-
- # To add assets to your plugin package, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
- #
- # For details regarding assets in packages, see
- # https://flutter.io/assets-and-images/#from-packages
- #
- # An image asset can refer to one or more resolution-specific "variants", see
- # https://flutter.io/assets-and-images/#resolution-aware.
-
- # To add custom fonts to your plugin package, add a fonts section here,
- # in this "flutter" section. Each entry in this list should have a
- # "family" key with the font family name, and a "fonts" key with a
- # list giving the asset and other descriptors for the font. For
- # example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
- # - asset: fonts/Schyler-Italic.ttf
- # style: italic
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
- # For details regarding fonts in packages, see
- # https://flutter.io/custom-fonts/#from-packages