Flutter adding text into TextField controller

Rhodes
:

When i use this code it works correctly, the controller.text is updated.

textController.addListener(() {
          setState(() {
            textController.text = analyzeText;
          });
        });

But when i try to add end of text, it crash does not give error. Why?

textController.addListener(() {
          setState(() {
            textController.text += ' ' + analyzeText;
          });
        });

João Soares
:

It seems to me that you are creating a never ending loop, possibly creating a memory leak of sorts. You have a listener listening for changes in a controller, and inside that listener you are making a change to that very same controller. So once it starts, it never stops. That is very likely to cause a crash.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

adding space between icon and text in textfield

From Java

Flutter TextField hint text not aligned center horizontally

From Dev

Wrap text in a TextField flutter without creating a newline

From Dev

Adding space between textfield character when typing in text filed

From Dev

Create a text file with Textfield data and upload to firebase storage in Flutter

From Dev

Flutter - Text Editing controller empty, but Flutter thinks there's a value present?

From Dev

Displaying text entered into textfield (in second view controller) in a label on first view controller?

From Dev

Adding a listener on a Wicket TextField

From Dev

Vaadin: Adding placeholder to TextField

From Dev

Vaadin: Adding placeholder to TextField

From Dev

Adding JavaFX TextField to JPanel

From Dev

Adding value from textfield

From Dev

I am adding a textfield dynamically via jQuery and id of text field is not incrementing

From Java

Textfield validation in Flutter

From Dev

flutter :Hide keyboard for a TextField

From Dev

Flutter RaisedButton covering TextField

From Dev

Flutter: How can I change the Alignment of a Text in a Textfield programmatically via buttons?

From Dev

setlayout when dynamic adding textField

From Dev

Adding TextField and its listerner in LibGdx

From Dev

Replace Text with number in TextField

From Dev

Delete Text in a textfield

From Dev

Limit Text Input in TextField

From Dev

Replace Text with number in TextField

From Dev

Even width of Text and Textfield

From Dev

Format part of text in TextField

From Dev

JavaFX TextField text validation

From Dev

Adding a controller to an element directive

From Dev

Obtaining text from a user with one View Controller, Adding that value to the database and displaying it in another VC

From Java

How to get the TextField value in flutter

Related Related

  1. 1

    adding space between icon and text in textfield

  2. 2

    Flutter TextField hint text not aligned center horizontally

  3. 3

    Wrap text in a TextField flutter without creating a newline

  4. 4

    Adding space between textfield character when typing in text filed

  5. 5

    Create a text file with Textfield data and upload to firebase storage in Flutter

  6. 6

    Flutter - Text Editing controller empty, but Flutter thinks there's a value present?

  7. 7

    Displaying text entered into textfield (in second view controller) in a label on first view controller?

  8. 8

    Adding a listener on a Wicket TextField

  9. 9

    Vaadin: Adding placeholder to TextField

  10. 10

    Vaadin: Adding placeholder to TextField

  11. 11

    Adding JavaFX TextField to JPanel

  12. 12

    Adding value from textfield

  13. 13

    I am adding a textfield dynamically via jQuery and id of text field is not incrementing

  14. 14

    Textfield validation in Flutter

  15. 15

    flutter :Hide keyboard for a TextField

  16. 16

    Flutter RaisedButton covering TextField

  17. 17

    Flutter: How can I change the Alignment of a Text in a Textfield programmatically via buttons?

  18. 18

    setlayout when dynamic adding textField

  19. 19

    Adding TextField and its listerner in LibGdx

  20. 20

    Replace Text with number in TextField

  21. 21

    Delete Text in a textfield

  22. 22

    Limit Text Input in TextField

  23. 23

    Replace Text with number in TextField

  24. 24

    Even width of Text and Textfield

  25. 25

    Format part of text in TextField

  26. 26

    JavaFX TextField text validation

  27. 27

    Adding a controller to an element directive

  28. 28

    Obtaining text from a user with one View Controller, Adding that value to the database and displaying it in another VC

  29. 29

    How to get the TextField value in flutter

HotTag

Archive