Skip to content

Conversation

SadraKafiri
Copy link

📜 Description

This PR introduces a new showModeButtons property to the BetterFeedback widget, allowing developers to control whether mode switch buttons (e.g., navigate, draw) are visible in the feedback UI.

When set to false, the mode cannot be changed by the user via UI buttons and will only use the mode provided through the mode property.

💡 Motivation and Context

Previously, the feedback UI always displayed the mode switch buttons, which might not be desirable in certain use cases — for example, when you want to lock the user into a specific mode without showing extra UI elements.
This change provides more flexibility and cleaner UI control.

💚 How did you test it?

  • Manually tested with showModeButtons set to both true and false in a sample app.
  • Verified that when false, only the mode property determines the feedback mode.
  • Verified that when true, the UI displays both mode switch buttons as expected.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs for the new property
  • All tests passing
  • No breaking changes

🔮 Next steps

  • Release a new version of the package including this feature.
  • Update the README with usage examples for showModeButtons.

@SadraKafiri SadraKafiri requested a review from ueman as a code owner August 13, 2025 12:55
@@ -8,6 +8,7 @@ void main() {
Widget create({
Color? activeColor,
FeedbackMode? mode,
bool? showNavigateButton,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool? showNavigateButton,
bool? showModeButton,

Copy link
Owner

@ueman ueman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a small nit

@ueman
Copy link
Owner

ueman commented Aug 18, 2025

Thanks for the contribution 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants