Skip to content

Commit 7451808

Browse files
author
Ali Abdelfattah
authored
Update README.md (#245)
1 parent f4d673c commit 7451808

File tree

1 file changed

+21
-84
lines changed

1 file changed

+21
-84
lines changed

README.md

Lines changed: 21 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ A Flutter plugin for [Instabug](https://instabug.com/).
88

99
| Feature | Status |
1010
|:---------------------------------------------------------:|:-------:|
11-
| [Bug Reporting](https://instabug.com/bug-reporting) ||
12-
| [Crash Reporting](https://instabug.com/crash-reporting) ||
13-
| [In-App Chat](https://instabug.com/in-app-chat) ||
14-
| [In-App Surveys](https://instabug.com/in-app-surveys) ||
15-
| [Feature Requests](https://instabug.com/feature-requests) ||
11+
| [Bug Reporting](https://docs.instabug.com/docs/flutter-bug-reporting) ||
12+
| [Crash Reporting](https://docs.instabug.com/docs/flutter-crash-reporting) ||
13+
| [App Performance Monitoring](https://docs.instabug.com/docs/flutter-apm) ||
14+
| [In-App Replies](https://docs.instabug.com/docs/flutter-in-app-replies) ||
15+
| [In-App Surveys](https://docs.instabug.com/docs/flutter-in-app-surveys) ||
16+
| [Feature Requests](https://docs.instabug.com/docs/flutter-in-app-feature-requests) ||
1617

1718
* ✅ Stable
1819
* ⚙️ Under active development
@@ -42,46 +43,14 @@ To start using Instabug, import it into your Flutter app.
4243
```dart
4344
import 'package:instabug_flutter/instabug_flutter.dart';
4445
```
45-
* #### iOS
46-
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.
4746

48-
```dart
49-
Instabug.start('APP_TOKEN', [InvocationEvent.shake]);
50-
```
51-
* #### Android
52-
1. Add the following Maven repository to your project level `build.gradle`
47+
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.
5348

5449
```dart
55-
allprojects {
56-
repositories {
57-
maven {
58-
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
59-
}
60-
}
61-
}
50+
Instabug.start('APP_TOKEN', [InvocationEvent.shake]);
6251
```
6352

64-
65-
2. **⚠️ For Instabug versions <= v10.11.0 only.**
66-
Initialize the android SDK:
67-
68-
1. Create a new Java class that extends `FlutterApplication` and add it to your `AndroidManifest.xml`.
69-
70-
```xml
71-
<application
72-
android:name=".CustomFlutterApplication"
73-
...
74-
</application>
75-
````
76-
77-
1. In your newly created `CustomFlutterApplication` class, override `onCreate()` and add the following code.
78-
79-
80-
```java
81-
ArrayList<String> invocationEvents = new ArrayList<>();
82-
invocationEvents.add(InstabugFlutterPlugin.INVOCATION_EVENT_SHAKE);
83-
new InstabugFlutterPlugin().start(CustomFlutterApplication.this, "APP_TOKEN", invocationEvents);
84-
```
53+
> :warning: If you're updating the SDK from versions prior to v11, please check our [migration guide](https://docs.instabug.com/docs/flutter-migration-guide).
8554
8655
## Crash reporting
8756

@@ -90,42 +59,21 @@ Instabug automatically captures every crash of your app and sends relevant detai
9059
⚠️ **Crashes will only be reported in release mode and not in debug mode.**
9160

9261

93-
1. Import the following into your `main.dart`:
62+
Replace `void main() => runApp(MyApp());` with the following snippet:
9463

9564
```dart
96-
import 'package:instabug_flutter/instabug_flutter.dart';
65+
void main() async {
66+
FlutterError.onError = (FlutterErrorDetails details) {
67+
Zone.current.handleUncaughtError(details.exception, details.stack);
68+
};
69+
runZonedGuarded<Future<void>>(() async {
70+
runApp(MyApp());
71+
}, (Object error, StackTrace stackTrace) {
72+
CrashReporting.reportCrash(error, stackTrace);
73+
});
74+
}
9775
```
9876

99-
2. Replace `void main() => runApp(MyApp());` with the following snippet.
100-
101-
Recommended:
102-
```dart
103-
void main() async {
104-
FlutterError.onError = (FlutterErrorDetails details) {
105-
Zone.current.handleUncaughtError(details.exception, details.stack);
106-
};
107-
runZonedGuarded<Future<void>>(() async {
108-
runApp(MyApp());
109-
}, (Object error, StackTrace stackTrace) {
110-
CrashReporting.reportCrash(error, stackTrace);
111-
});
112-
}
113-
```
114-
115-
For Flutter versions prior to 1.17:
116-
```dart
117-
void main() async {
118-
FlutterError.onError = (FlutterErrorDetails details) {
119-
Zone.current.handleUncaughtError(details.exception, details.stack);
120-
};
121-
runZoned<Future<void>>(() async {
122-
runApp(MyApp());
123-
}, onError: (dynamic error, StackTrace stackTrace) {
124-
CrashReporting.reportCrash(error, stackTrace);
125-
});
126-
}
127-
```
128-
12977
## Repro Steps
13078
Repro Steps list all of the actions an app user took before reporting a bug or crash, grouped by the screens they visited in your app.
13179

@@ -139,18 +87,7 @@ Repro Steps list all of the actions an app user took before reporting a bug or c
13987
⚠️ Screenshots in repro steps on android is not currently supported.
14088

14189
## Network Logging
142-
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:
143-
```
144-
InstabugCustomHttpClient client = InstabugCustomHttpClient();
145-
```
146-
147-
and continue to use the package normally to make your network requests:
148-
149-
```
150-
client.getUrl(Uri.parse(URL)).then((request) async {
151-
var response = await request.close();
152-
});
153-
```
90+
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`, please refer to the [Instabug Dart IO Http Client](https://github.com/Instabug/instabug-dart-io-http-client) repository.
15491

15592
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](https://github.com/Instabug/Instabug-Dart-http-Adapter) and the [Instabug Dio Interceptor](https://github.com/Instabug/Instabug-Dio-Interceptor) repositories.
15693

0 commit comments

Comments
 (0)