-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
details tag support #35
Conversation
Thank you for the pull request. I will review this soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are some good changes. Thanks for the pull request! Just a couple additional things to make this a tad more maintainable.
lib/html_parser.dart
Outdated
@@ -4,6 +4,7 @@ import 'package:html/dom.dart' as dom; | |||
|
|||
typedef CustomRender = Widget Function(dom.Node node, List<Widget> children); | |||
typedef OnLinkTap = void Function(String url); | |||
typedef ParseNodeFunction = List<Widget> Function(List<dom.Node> nodeList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than creating a custom callback to parse widgets, just pass in the list of children Widgets to the Widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it after refactoring because it is also needed to build
node content, but we cannot know in advance if there is a "summary" tag, or have to determine the content of the tag outside the class, which seems to me not the best way to structure the code.
This package has changed a great deal and will continue to change a great deal since you first opened this pull request. I'm going to close this pull request for now. If you are willing to make the changes to make this compatible with the most recent version, including the Thank you! |
Hi, add StatefulWidget for details tag.