Skip to content

Add a central SentryWidget #1839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
buenaflor opened this issue Jan 23, 2024 · 1 comment · Fixed by #1846
Closed

Add a central SentryWidget #1839

buenaflor opened this issue Jan 23, 2024 · 1 comment · Fixed by #1846
Assignees

Comments

@buenaflor
Copy link
Contributor

buenaflor commented Jan 23, 2024

Description

Let's explore the possibility to add a central SentryWidget that allows to enable/disable features of other widgets such as SentryScreenshotWidget etc... so we avoid causing a nested Widget structure for the user.

This also helps in eliminating the need for adding new widgets for cases such as #1832 since we could potentially just add it to the SentryWidget

@buenaflor
Copy link
Contributor Author

buenaflor commented Jan 25, 2024

  Widget build(BuildContext context) {
    Widget content = widget.child;
    content = SentryScreenshotWidget(child: content);
    content = SentryUserInteractionWidget(child: content);
    // ... add more relevant widgets
    return content;
  }

// and the user only needs to do:
SentryWidget(child ...);

doing something like this works fine, we prolly should get the flutter options to conditionally add the widgets to reduce overhead for unused widgets

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

Successfully merging a pull request may close this issue.

2 participants