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
Click handler on hyperlink is not working #15
Comments
That is exactly how our links look coming through from Contentful, and the code is working as intended (shows the text, text is clickable, we're able to format it, etc.) This is a widget we use as is from this plugin, without overriding or theming it. I believe it's important to maintain the recursive nature of how the children work (each nested content block in turn is given to a child function to process until done) and not to dive manually into the upcoming content blocks unless absolutely necessary. Are you maybe providing a custom Hyperlink widget that was originally based on this one? That's fine if so, but we can't support custom widget implementations. Beyond that though, I'm not sure where the issue is. This widget code processes the Hyperlink content blocks in order properly given JSON the same as what you provided. For reference, here's a sample of the Contentful object from one of our apps, which appears to follow the same structure as the JSON you shared.
|
Previously the app could not open links provided in hyperlinks (using the same structure as you mentioned). I've reverted the changes and now it works as expected. I'm closing this issue now and thanks for the quick response |
This was probably a configuration issue with url_launcher. Checkout https://pub.dev/packages/url_launcher#configuration I seemed to be having a similar issue. For me it was launching on iOS but not Android. Digging in it was getting a |
Hi, thank you for the awesome plugin.
I have data coming from contentful and some part of the data passed to
Hyperlink
class looks like this:{nodeType: hyperlink, content: [{nodeType: text, value: This is a text, marks: [], data: {}}], data: {uri: https://www.domain.com}}
ISSUE
With current implementation on
Hyperlink
class,SOLUTION
text: (node['content'][0])['value']
children
, therefore deleting line since its duplicating the above suggestionDo you have any other thoughts on this?
The text was updated successfully, but these errors were encountered: