I'm making a chat app with flutter
Can anyone help me to use different text direction on each line of textfield or suggest some library for rtl and ltr?
I tried to detect text direction in textfield by intl package it works just for one line of text and set direction of textfield based on first line of text
I need something like textView in telegram app that change direction of text according to each line of text
I need exactly something like this
question different-text-direction-for-different-lines-of-a-textview
This package didn't help me [auto_direction package] (
https://pub.dev/packages/auto_direction)
Related
I want to make a text form like this, how do I add color to certain text via regex?
Please check flutter this sample code,
https://flutter.github.io/samples/rich_text_editor.html
Exactly like the attached Image i need to select a word from the paragraph and highlight the particular word.
We tried using rich text but id doesn’t meet our requirement(we need to select a word and highlight it) so we need a alternate way to achieve this using flutter
Use RichText. Text widget uses it internally. You can provide list of TextSpan with different styles.
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
Is there an efficient way to implement the next line completion in flutter textfield ?
The image shows the final result, the grey text is human written and the red is app generated which can be either appended to the editable on textfield or canceled.
You may add some prediction words after user's input and still keep the cursor on his/her last entered character using TextInputFormatter. Flutter already has built-in formatters like FilteringTextInputFormatter.
Just switch to text when you want to show the prediction, there is no other way to do this in flutter.
You simply cannot show other text and options on textfield in flutter
Is there any way to highlight a specific part of a text inside a TextField in flutter like you can do in Microsoft Word?
Something like this but inside a Text Field in my flutter app:
The simplest way appears to be using a series of styled TextSpans.
Marc on Flutter Clutter has a really good tutorial on this:
https://www.flutterclutter.dev/flutter/tutorials/styling-parts-of-a-textfield/2021/101326/