Give hand icon and tooltip for the hightlighted words in a sentence flutter web - flutter

My requirement is to change the color of some words in a sentence and give hand icon and also show a tooltip with some actions.
Like this,
I used highlight_text: ^1.6.0.But I am facing two issues,
1)not able to add hand icon to that highlighted text
2)not able to give tooltips with some actions

SelectableText() widget may helps you for select text with cut ,copy /paste action , for more info explain briefly with some code snippets

Related

Can text in a Flutter web app be made searchable?

Problem:
When I run a Flutter app as a web app in a browser, I can use the browser's text search function Ctrl + F to search for text on the page. The search function finds all of the instances of the search term that are currently shown on screen, but it does not find all of the other instances of the text that are currently out of view.
Example:
In the example below I am searching for the word tile, which is used 8 times in total: 4 times in the blue tiles and another 4 times in the purple tiles.
However, when I search for the word tile, the browser only finds the 4 instances of the word that are currently shown on the screen at the time of the search. It ignores all instances of the word that are not rendered on the screen at the time of the search.
Documentation:
The Flutter and Dart documentation does not have any information on searchable text and I do not see any other similar widgets or properties available.
Attempts: I have tried using a SelectableText widget, but the same problem persists.
You can use element = document.getElementById('searchable_text') and element.textContent || a.innerText. See JavaScript tutorial on W3Schools.
Resources:
To create a list and assign it an Id, look at Get Started from Dart docs.
To select elements of the HTML document, read querySelector on Dart docs.
Tell us what worked for your!
This is something not supported by Flutter web yet (tracked here https://github.com/flutter/flutter/issues/53585).
One workaround can be to provide an in-app search bar for list views.
As flutter draws everything on canvas in web, android and ios so far so it doesn't support it.Means whatever you see, Text, images, etc on any flutter app it is just the drawing made on canvas.
If you scroll your page to the bottom before making a search, you should be able to find all the records you expect.
I believe those contents are not in the DOM until they enter the buffer of your viewport.
Meaning, they don't exists to the browser almost until you see them on your screen.
As for infinite lists, Flutter generates the rest of the DOM objects of your page while you scroll.
After scrolling, I can search and find all the words I'm reading, I see them highlighted.
The browser in not able to center on it when hitting Return or UP and DOWN arrows.

How to replicate tumblr tags in flutter

I am trying to replicate the mobile tag-adding mechanism that tumblr has. I have included a picture of the screen I am talking about below.
I want to replicate the following features:
Chips are inline with text field. Text field resizes dynamically to either take the remainder of the line, or take up the next line if the content is too long
Text is turned into a chip when a comma is added (e.g. If I am typing "dog", and then I type "dog,", A "dog" chip will be created
Long chips cut off content with ellipses
Chips can be deleted with backspace
There is no text field underline decoration
Chips fill up row then wrap to next row (and entire container scrolls if there are too many rows to display simultaneously)
There are some libraries that already exist to allow a text input field with chips, but they have a lot of other features that I'm not interested in right now like the recommendation system etc, and generally just don't look the way I want with regards to multiple lines and text wrapping etc. If anyone knows how to replicate the example below, I would really appreciate it!

How to add tooltip entries for items in Eclipse SWT combo

The exact already asked question to what I'd like to do is: how to add tooltip on the entries and not the combo....
I cannot use a CCombo. JoeYo said that he solved it by using a DefaultToolTip class on the Combo, but he didn't elaborate.
Can anyone, (#JoeYo hopefully) give me a bit more detail how to got the handle on the list, once dropped, to capture the mouse hover events, and then of course display the tool tip?
If I was supposed to ask for more info on the original question, I could not figure out how. I tried to comment, but was told I did not have enough credits.
DefaultToolTip is part of JFace. Other than the native tooltip of the platform, it can be freely positioned and shown/hidden. Internally it is comprised of a Shell that when shown stays on top of all other controls.
In combination with a MouseListener, the getVisibleItemCount() and getItemHeight you might be able to compute above which item (if any) the mouse cursor hovers and show a tooltip with suitable content.
This answer has a snippet that computes which item of a List widget is under the mouse pointer. It should be possible to adapt it for the Combo widget. The remaining difficulty is probably to figure out the of the drop-down and the gap between of the Combo and its drop-down.

How to highlight text in epub like ibooks app

I need to highlight text in epub book,when user selects the text,i can get the text,what the user has selected,but i need to highlight,the text permanently what user selected,thanks,any help will ne appreciated.
There's nothing built in to iOS that will do this. Some broad techniques that might work:
If you're showing the book in a web view, you might be able to wrap that area in a span and style it to create a highlight.
If you're using Core Text, you could draw the highlight in directly, either before or after drawing the text. (Your choice will decide how the highlight affects non-black text.)
You could add a transparent view over the text that draws in the highlight.
As for adding highlight-related items to the selection menu, see this Stack Overflow post. You probably won't be able to get icons in the menu like Apple does, though; that seems to be a private API. You could probably override the whole menu system if you want something closer to Apple's look, but that'll be quite a bit of work.

How to disable hover effect to highlight menu items in GWT MenuBar?

I am making a vertical Menu using GWT MenuBar and selection of particular MenuItem shows content on the right, I am trying to make something similar to TabPanel, but with Tabs on left instead of being on top. Now, since I've got the Menu items and actions in place, I want to remove the effect of hovering over and changing color, and keep that menu item selected which was clicked last and whose content is loaded on the right.
I am open to any comments, if you have a better solution to implement this, using some other components(with-in) GWT, please drop in a comment with your suggestions, I'll really appreciate that.
Or if you can just tell me how can I disable this effect, of hovering and sticking to only that selection, That would be awesome too..
Thanks to everyone, taking time to read this and suggesting a solution.
It's all defined in the CSS of your GWT's theme (probably the default one), so it's a matter of overriding those styles - make sure it's not the other way around :) Inspect the code with a tool like Firebug to see what's exactly being set and change that.