Skip to content

Commit 2f11743

Browse files
feat: app variant
1 parent db8901f commit 2f11743

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

lib/src/modules/instabug.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'dart:typed_data';
1111
import 'dart:ui';
1212

1313
import 'package:flutter/material.dart';
14+
1415
// to maintain supported versions prior to Flutter 3.3
1516
// ignore: unused_import
1617
import 'package:flutter/services.dart';
@@ -180,11 +181,12 @@ class Instabug {
180181
/// The [invocationEvents] are the events that invoke the SDK's UI.
181182
/// The [debugLogsLevel] used to debug Instabug's SDK.
182183
/// The [appVariant] used to set current App variant name.
183-
static Future<void> init(
184-
{required String token,
185-
required List<InvocationEvent> invocationEvents,
186-
LogLevel debugLogsLevel = LogLevel.error,
187-
String? appVariant}) async {
184+
static Future<void> init({
185+
required String token,
186+
required List<InvocationEvent> invocationEvents,
187+
LogLevel debugLogsLevel = LogLevel.error,
188+
String? appVariant,
189+
}) async {
188190
$setup();
189191
InstabugLogger.I.logLevel = debugLogsLevel;
190192
await _host.init(

pigeons/instabug.api.dart

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,65 @@ abstract class FeatureFlagsFlutterApi {
1212
@HostApi()
1313
abstract class InstabugHostApi {
1414
void setEnabled(bool isEnabled);
15+
1516
bool isEnabled();
17+
1618
bool isBuilt();
17-
void init(String token, List<String> invocationEvents, String debugLogsLevel,
18-
String? appVariant);
19+
20+
void init(
21+
String token,
22+
List<String> invocationEvents,
23+
String debugLogsLevel,
24+
String? appVariant,
25+
);
1926

2027
void show();
28+
2129
void showWelcomeMessageWithMode(String mode);
2230

2331
void identifyUser(String email, String? name, String? userId);
32+
2433
void setUserData(String data);
34+
2535
void setAppVariant(String appVariant);
2636

2737
void logUserEvent(String name);
38+
2839
void logOut();
2940

3041
void setLocale(String locale);
42+
3143
void setColorTheme(String theme);
44+
3245
void setWelcomeMessageMode(String mode);
46+
3347
void setPrimaryColor(int color);
48+
3449
void setSessionProfilerEnabled(bool enabled);
50+
3551
void setValueForStringWithKey(String value, String key);
3652

3753
void appendTags(List<String> tags);
54+
3855
void resetTags();
3956

4057
@async
4158
List<String>? getTags();
4259

4360
void addExperiments(List<String> experiments);
61+
4462
void removeExperiments(List<String> experiments);
63+
4564
void clearAllExperiments();
65+
4666
void addFeatureFlags(Map<String, String> featureFlagsMap);
67+
4768
void removeFeatureFlags(List<String> featureFlags);
69+
4870
void removeAllFeatureFlags();
4971

5072
void setUserAttribute(String value, String key);
73+
5174
void removeUserAttribute(String key);
5275

5376
@async
@@ -61,13 +84,17 @@ abstract class InstabugHostApi {
6184
String? crashMode,
6285
String? sessionReplayMode,
6386
);
87+
6488
void reportScreenChange(String screenName);
6589

6690
void setCustomBrandingImage(String light, String dark);
91+
6792
void setFont(String font);
6893

6994
void addFileAttachmentWithURL(String filePath, String fileName);
95+
7096
void addFileAttachmentWithData(Uint8List data, String fileName);
97+
7198
void clearFileAttachments();
7299

73100
void networkLog(Map<String, Object> data);

0 commit comments

Comments
 (0)