I'm running my app in ios simulator but why is my keyboard not showing all of the sudden when I click on the textfield? It works perfectly fine before I fix my app icon.
Tried deleting the app and re-install it again, but still won't work. When I run the app on android and click on the same textfield, the keyboard is showing.
Here is the code:
TextField(
keyboardType: TextInputType.multiline,
controller: inputTextController,
onChanged: (text) {
if (!_isWriting){
_isWriting = true;
//update typing status when type messages
var msg = {};
msg["api_key"] = apiKey;
msg["type"] = "status_typing";
msg["id_sender"] = idUser;
msg["id_receiver"] = idReceiver;
msg["room_id"] = conversation!.roomId;
String msgString = json.encode(msg);
homes.channel.sink.add(msgString);
setState((){});
Future.delayed(Duration(seconds: 2)).whenComplete((){
_isWriting = false;
setState((){});
});
}
},
maxLines: null,
style: TextStyle(
color: Colors.black,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.only(top: 13, bottom: 13),
border: InputBorder.none,
hintText: 'Type a message',
hintStyle: TextStyle(
color: Color(0xff99999B),
)
),
),
Any solutions?
CodePudding user response:
For show keyboard in simulator follow this command
cmd shift k
CodePudding user response:
goto I/O menu in Simulator window and inside keyboard unclick "connect hardware keyboard" or open simulator window and press cmd shift k