Skip to content

Conversation

erickok
Copy link
Contributor

@erickok erickok commented Jan 15, 2021

Same as #298 but only the minimal required changes to make this work.

          customRender: {
            "bird": (RenderContext context, Widget child, attributes, _) {
              return TextSpan(text: "🐦");
            },
          },

Side note: I noticed that custom renders only work for tags with a proper, separate closing tag (not self-closing) but I guess that is in line with the html spec (and an implementation of the html parser in the end).

Same as Sub6Resources#298 but only the minimal required changes to make this work
Copy link
Contributor

@ryan-berger ryan-berger left a comment

Choose a reason for hiding this comment

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

This looks good to me. Definitely gives us a bit more control over how we render with a customRender

@ryan-berger
Copy link
Contributor

@erickok Once conflicts are fixed I can merge this

…n-customrender

# Conflicts:
#	lib/html_parser.dart
@erickok
Copy link
Contributor Author

erickok commented Jan 17, 2021

Resolved.

@ryan-berger ryan-berger merged commit 5429f07 into Sub6Resources:master Jan 17, 2021
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