Instabug class

Constructors

Instabug()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addExperiments(List<String> experiments) Future<void>
Adds experiments to the next report.
addFileAttachmentWithData(Uint8List data, String fileName) Future<void>
Add file to be attached to the bug report. data of the file fileName of the file
addFileAttachmentWithURL(String filePath, String fileName) Future<void>
Add file to be attached to the bug report. filePath of the file fileName of the file
appendTags(List<String> tags) Future<void>
Appends a set of tags to previously added tags of reported feedback, bug or crash.
clearAllExperiments() Future<void>
Clears all experiments from the next report.
clearFileAttachments() Future<void>
Clears all Uris of the attached files. The URIs which added via {@link Instabug#addFileAttachment} API not the physical files.
getTags() Future<List<String>?>
Gets all tags of reported feedback, bug or crash. Returns the list of tags.
getUserAttributeForKey(String key) Future<String?>
Returns the user attribute associated with a given key.
getUserAttributes() Future<Map<String, String>>
A new Map containing all the currently set user attributes, or an empty Map if no user attributes have been set.
identifyUser(String email, [String? name, String? id]) Future<void>
Sets the default value of the user's email and hides the email field from the reporting UI and set the user's name and id to be included with all reports. It also reset the chats on device to that email and removes user attributes, user data and completed surveys.
init({required String token, required List<InvocationEvent> invocationEvents, LogLevel debugLogsLevel = LogLevel.error}) Future<void>
Starts the SDK. This is the main SDK method that does all the magic. This is the only method that SHOULD be called. The token that identifies the app, you can find it on your dashboard. The invocationEvents are the events that invoke the SDK's UI. The debugLogsLevel used to debug Instabug's SDK.
logOut() Future<void>
Sets the default value of the user's email to nil and show email field and remove user name from all reports It also reset the chats on device and removes user attributes, user data and completed surveys.
logUserEvent(String name) Future<void>
Logs a user event with name that happens through the lifecycle of the application. Logged user events are going to be sent with each report, as well as at the end of a session.
removeExperiments(List<String> experiments) Future<void>
Removes certain experiments from the next report.
removeUserAttribute(String key) Future<void>
Removes a given key and its associated value from user attributes. Does nothing if a key does not exist.
reportScreenChange(String screenName) Future<void>
Reports that the screen has been changed (repro steps) screenName String containing the screen name
resetTags() Future<void>
Manually removes all tags of reported feedback, bug or crash.
setColorTheme(ColorTheme colorTheme) Future<void>
Sets the color theme of the SDK's whole UI to the colorTheme given. It should be of type ColorTheme.
setCustomBrandingImage({required AssetImage light, required AssetImage dark, BuildContext? context}) Future<void>
Sets a custom branding image logo with light and dark images for different color modes.
setEnabled(bool isEnabled) Future<void>
Enables or disables Instabug functionality. boolean isEnabled
setFont(String font) Future<void>
Changes the font of Instabug's UI. font The asset path to the font file (e.g. "fonts/Poppins.ttf").
setLocale(IBGLocale locale) Future<void>
Sets the SDK's locale. Use to change the SDK's UI to different language. Defaults to the device's current locale.
setPrimaryColor(Color color) Future<void>
Sets the primary color of the SDK's UI. Sets the color of UI elements indicating interactivity or call to action. color primaryColor A color to set the UI elements of the SDK to.
setReproStepsConfig({ReproStepsMode? bug, ReproStepsMode? crash, ReproStepsMode? sessionReplay, ReproStepsMode? all}) Future<void>
Sets the repro steps mode for Bug Reporting, Crash Reporting and Session Replay.
setSessionProfilerEnabled(bool sessionProfilerEnabled) Future<void>
Enable/disable session profiler sessionProfilerEnabled desired state of the session profiler feature.
setUserAttribute(String value, String key) Future<void>
Add custom user attribute value with a key that is going to be sent with each feedback, bug or crash.
setUserData(String userData) Future<void>
Adds specific user data that you need to be added to the reports userData data to be added
setValueForStringWithKey(String value, CustomTextPlaceHolderKey key) Future<void>
Overrides any of the strings shown in the SDK with custom ones. Allows you to customize a value shown to users in the SDK using a predefined key.
setWelcomeMessageMode(WelcomeMessageMode welcomeMessageMode) Future<void>
Sets the welcome message mode to live, beta or disabled. welcomeMessageMode An enum to set the welcome message mode to live, beta or disabled.
show() Future<void>
invoke sdk manually
showWelcomeMessageWithMode(WelcomeMessageMode welcomeMessageMode) Future<void>
Shows the welcome message in a specific mode. welcomeMessageMode is an enum to set the welcome message mode to live, or beta.