Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork924
Possible Toast, Snackbar or Popover ability?#791
-
Hello All, I've been checking out this great package in a recent build. I was asked about the ability to click on an acronym and see the full description. Similar to a popover with javascript (ie...example in bs4). I tried a Custom Rendering and can get a Toast or other type of widget to show like so: However, I have struck out trying to NOT replace the text.
will not work as child. Text() will, but that will replace the text as well. Is there a way to get the text surrounded in the Tag? Something like Text(this.text); Thanks! |
BetaWas this translation helpful?Give feedback.
All reactions
After putting up this q/a, I was able to hack something together here. I think this works pretty well and can be used for other widgets I am sure. I'm using thefluttertoast package in my example.
child: Html( data: """<p>Display <abbr>bird element</abbr> and flutter element</p>""", style: { "p": Style( fontStyle: FontStyle.normal, fontSize: FontSize.larger) }, customRender: { "abbr": (RenderContext context, Widget child) { return GestureDetector( onTap: () { Flu…Replies: 1 comment
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
After putting up this q/a, I was able to hack something together here. I think this works pretty well and can be used for other widgets I am sure. I'm using thefluttertoast package in my example. This example just uses the tag abbr which is part of the package, but you could utilize something custom. One thing to note, I am using the to store the full description, however, it a standard html site, it would be title="" holding the full description. Hope this helps someone looking for this same thing. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1