User email opt-in
By default, the last step in the feedback flow asks the user for their email address. You can pre-fill this field by setting custom metadata; however, the user always has the option to remove their email from the input field for privacy reasons.
If you want to skip or disable this step, you can hide the email prompt by setting email: EmailPrompt.hidden
in your feedbackOptions
:
return Wiredash(
// ...
feedbackOptions: WiredashFeedbackOptions(
email: EmailPrompt.hidden,
),
);
Prefilling email address
To prefill the email address, use the setUserProperties
method before launching the feedback flow:
Wiredash.of(context).setUserProperties(
userEmail: 'mail@example.com',
);
INFO
For privacy reasons, the userEmail
will not be attached automatically but will be used to populate the input field, so the user does not have to fill it in manually.
You can also use Wiredash.of(context).modifyMetaData()
to attach custom metadata and provide the user email through that:
Wiredash.of(context).modifyMetaData((metadata) => metadata
..userEmail = 'mail@example.com',
);