Closed krille-chan closed 1 year ago
Thank you for the contribution! Your pull request has raised a good question: What type of official extensions for flutter_html
should we maintain in this repository?
Here's a rough outline, with more to come in the wiki soon:
flutter_html
?
If no, consider releasing as a third-party extension package.flutter_html
library as a built-in HtmlExtension
.Although this extension you've written meets the last three points, the answer to the first question is a no. I'm not aware of any major browsers that perform automatic syntax highlighting in <code>
blocks, without external Javascript. (Please let me know if I'm mistaken!)
As such, I highly encourage you to publish this as your own standalone package! Syntax highlighting is definitely useful, even if major browsers (and thus flutter_html
) don't perform it automatically. See https://dart.dev/tools/pub/publishing for best practices and tips for getting started with publishing your own packages.
Let me know if you have any questions!
Thank you very much for your response and I totally agree with you. I will publish it as a standalone package on pub.dev and link it here later
This is my attempt to contribute an official extension. Just uses the flutter_highlighter package to render nice code blocks. I have this already in use in two of my Flutter apps :)