Skip to content
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

[BUG] Only the first builder function is called when there are multiple TagWrapExtensions #1438

Open
incofab opened this issue Sep 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@incofab
Copy link

incofab commented Sep 3, 2024

Describe the bug:
If I have more than one TagWrapExtension for different Tags and what to wrap then with different tags. All the tags eventually gets wrapped by the same tag of the first TagWrapExtension in the entry.

HTML to reproduce the issue:

  Html(
          document: data,
          extensions: [
            TagWrapExtension(
              tagsToWrap: {'table', 'math'},
              builder: (child) {
                return SingleChildScrollView(
                  scrollDirection: Axis.horizontal,
                  child: Container(
                    width: 700,
                    margin: const EdgeInsets.symmetric(vertical: 5),
                    child: child,
                  ),
                );
              },
            ),
            TagWrapExtension(
              tagsToWrap: {'p''},
              builder: (child) {
                return  Container(
                    height: 100,
                    margin: const EdgeInsets.symmetric(vertical: 20),
                    child: child,
                );
              },
            ),
     ]
);

Html widget configuration:

Expected behavior:
The builder function of each TagWrapExtension should be applied to accordingly

Screenshots:

Device details and Flutter/Dart/flutter_html versions:

Stacktrace/Logcat

Additional info:

A picture of a cute animal (not mandatory but encouraged)

@incofab incofab added the bug Something isn't working label Sep 3, 2024
@incofab incofab changed the title [BUG] Only the first bulder function is call when there's multiple TagWrapExtension [BUG] Only the first builder function is called when there are multiple TagWrapExtensions Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant