Home > Mobile >  Unable to remove Flutter TextField input character to list list?
Unable to remove Flutter TextField input character to list list?

Time:09-17


Unable to remove Flutter TextField input character to list list?

I added a TextField normal controls, listening input

OnChange (value) {

List The list=value. The split (' ');

Print (' pre is' + list. The toString ());

List. The removeAt (1);

//list. RemoveRange (0, 1);

Print (' the result is' + list. The toString ());

}

Remove the back of the print still cannot print, pure Dart run there is no problem,

CodePudding user response:

List List=new ArrayList (the value. The split ('));

CodePudding user response:

Is not Android code, flutter, Dart language no ArrayList,,,

CodePudding user response:

No great god met?

CodePudding user response:

reference 1st floor BDMH response:
List List=new ArrayList (the value. The split ('));

Positive solution

CodePudding user response:

Thanks to two, mainly because after the split is fixed length arrays, can't delete, two upstairs means new a new array, add in,
  • Related