I have have a textfield that listens for barcode entries and i dont want the textfield to be unfocused whenever its submitted or whenever TAB button is clicked and the focus is shifted to another button .
I tried requesting the focus on the textfield every second while the screen is open and its working, but i just wanna know if there's something healthier or cleaner.
Timer.periodic(Duration(seconds: 1),(Timer t) => FocusScope.of(context).requestFocus(node));
Aucun commentaire:
Enregistrer un commentaire