I created six digit passcode filed component and it is working fine as expected in bigger size emulator but when I check with small size emulator, the passcode input is hidden by keyboard.
child: TextField(
enableInteractiveSelection: false,
focusNode: focusNode,
controller: widget.controller,
keyboardType: TextInputType.number,
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
style: const TextStyle(
height: 0.1,
color: Colors.transparent,
),
decoration: const InputDecoration(
focusedErrorBorder: transparentBorder,
errorBorder: transparentBorder,
disabledBorder: transparentBorder,
enabledBorder: transparentBorder,
focusedBorder: transparentBorder,
helperStyle: TextStyle(
color: Colors.transparent,
),
fillColor: Colors.transparent,
border: InputBorder.none,
),
cursorColor: Colors.transparent,
showCursor: false,
maxLength: widget.maxLength,
onChanged: _onTextChanged,
),
Can you check this package: keyboard_visibility You can get the state of your keyboard and based on that hide/show your text widgets. Consider the following code: