In-app feedback for Flutter apps
In-app feedback enables you to ask for feedback from your users. App users can then attach and annotate images/screenshots, include logs and diagnostics, or report a bug while sharing a feedback. It comes with an in-built annotator that helps app users mask any sensitive information, scribble on the screenshots, or add arrows to pinpoint the areas with issues.
Opening feedback screen
- Use the openFeedback() method to directly open the feedback screen where users can submit the feedback.
Copied
Report bug with screenshot annotation
- The reportBug() method allows the users to take a screenshot and annotate it to report the bugs.
Copied
Example:
Copied
Enable / disable shake-to-feedback
- Shake-to-feedback allows the users to shake their smart devices to open the feedback screen. You can manually enable or disable this feature.
Enable shake for feedback
- Use the enableshakeForFeedback() method to enable shake for feedback.
Note: Shake for feedback is enabled by default.
Copied
Disable shake for feedback
- Use the disableShakeForFeedback() method to activate shake for feedback.
Copied
Check if shake is enabled
- Use the isShakeForFeedbackEnabled() method to check if shake is enabled.
Copied
Example
Copied
Enable / Disable anonymous user alerts
- Enable or disable anonymous user alerts for collecting feedback without the need for user identification.
Note: Anonymous user alerts are enabled by default.
Enable anonymous user alert
- Use the enableAnonymousUserAlert() method to enable the anonymous user alert.
Copied
Disable anonymous user alert
- Use the disableAnonymousUserAlert() method to disable the anonymous user alert.
Copied
Example
Copied
Check if anonymous user alert is enabled
- Use the isAnonymousUserAlertEnabled() method to check if the anonymous user alert is enabled.
Copied
Progammatically sending feedback
- The sendFeedback() method allows you to programmatically send feedback with options to include logs, diagnostic info, and attachments.
Copied
Parameters:
- feedbackMessage - The content of the feedback shared
- includeLogs - Whether to include logs or not
- includeDiagnostics - Whether to include diagnostic data
- guestMailId (optional) - User email from which the feedback is sent
- forceToAnonymous (optional) - Forces the feedback to be submitted without user identification
- attachmentsUri (optional) - Attachments, for example, screenshots
Programmatically send bug report
- The sendBugReport() method will allow the users to send a bug report with logs, diagnostics, and optional attachments.
Copied
Parameters:
- feedbackMessage - The content of the feedback shared
- includeLogs - Whether to include logs or not
- includeDiagnostics - Whether to include diagnostic data
- guestMailId (optional) - User email from which the feedback is sent
- forceToAnonymous (optional) - Forces the feedback to be submitted without user identification
- attachmentsUri (optional) - Attachments, for example, screenshots
Example
Copied
Feedback logs
The feedback module provides the necessary APIs to add logs and diagnostic info detail from within the app. The files containing these data can be sent by the user while sending the feedback.
- Use the below method to write a log.
Copied
- Use the below method to attach a log file.
Copied
Note: If both addLogFile and writeLogs are set by the developer, priority is given to the addlog file. Only one logfile is allowed per feedback and it cannot exceed 1MB in size.
A diagnostic info file is a set of key-value pairs, where each pair can be grouped under the given heading. To add diagnostic info, follow the below.
Copied
Example
Copied