Skip to content

Commit 0aa548f

Browse files
committed
📝 Documentation
1 parent d6ee180 commit 0aa548f

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

android/src/main/java/com/instabug/instabugflutter/InstabugFlutterPlugin.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ public void onMethodCall(MethodCall call, Result result) {
7979
}
8080
}
8181

82+
/**
83+
* starts the SDK with the desired
84+
* @param token token The token that identifies the app, you can find
85+
* it on your dashboard.
86+
* @param invocationEvents invocationEvents The events that invoke
87+
* the SDK's UI.
88+
*/
89+
8290
public void start(Application application, String token, ArrayList<String> invocationEvents) {
8391
InstabugInvocationEvent[] invocationEventsArray = new InstabugInvocationEvent[invocationEvents.size()];
8492
for (int i = 0; i < invocationEvents.size(); i++) {

ios/Classes/InstabugFlutterPlugin.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
4343
}
4444
}
4545

46-
46+
/**
47+
* starts the SDK with the desired
48+
* @param {token} token The token that identifies the app, you can find
49+
* it on your dashboard.
50+
* @param {invocationEvents} invocationEvents The events that invoke
51+
* the SDK's UI.
52+
*/
4753
+ (void)startWithToken:(NSString *)token invocationEvents:(NSArray*)invocationEventsArray {
4854
NSDictionary *invocationEventsMap = [self constants];
4955
NSInteger invocationEvents = IBGInvocationEventNone;

lib/instabug_flutter.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ class InstabugFlutter {
1313
return version;
1414
}
1515

16+
/*
17+
* Starts the SDK.
18+
* This is the main SDK method that does all the magic. This is the only
19+
* method that SHOULD be called.
20+
* Should be called in constructor of the app registery component
21+
* @param {string} token The token that identifies the app, you can find
22+
* it on your dashboard.
23+
* @param {List<InvocationEvent>} invocationEvents The events that invoke
24+
* the SDK's UI.
25+
*/
1626
static void start(String token, List<InvocationEvent> invocationEvents) async {
1727
List<String> invocationEventsStrings = new List<String>();
1828
invocationEvents.forEach((e) {

0 commit comments

Comments
 (0)