I'm getting input to my textfield from barcode scanner so I dont need softkeyboard to open when textfield in focus.To achieve that I tried TextInputType.none
it hides the keyboard but also can't receive input from scanner.
TextField(
keyboardType: TextInputType.none,
controller: loginTextController,
focusNode: _loginTextfieldFocus,
decoration: decoration(context,loginTextController),
onChanged: (s){
if(s.contains('\n')||s.contains('\r')){
Log.d("Enter event found");
}
},
),
I also tried SystemChannels.textInput.invokeMethod('TextInput.hide');
but it hides only first time. Whenever a character added in textfield softkeyboard becomes visible.