I wanted to use this pin code field generator, but parts of it are deprecated.
_pin = List<String>(widget.fields);
_focusNodes = List<FocusNode>(widget.fields);
_textControllers = List<TextEditingController>(widget.fields);
(widget.fields is an integer)
These lines tell me 'List' is deprecated.
I tried to convert the first one to List.filled(not sure it's correct though), but couldn't figure out the others.
List<String> _pin;
List<FocusNode> _focusNodes;
List<TextEditingController> _textControllers;
_pin = List<String>.filled(widget.fields, '');
I read through the documentation here, but it's not clear enough for me.
Thanks in advance.