When the keyboard appears, the Flutter widgets resize. How to prevent this?

I have a Column of Expanded widgets like this: return new Container( child: new Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ new Expanded( flex: 1, child: convertFrom, ), new Expanded( flex: 1, child: convertTo, ), new Expanded( flex: 1, child: description, ), ], ), ); It looks like this: convertFrom, includes a TextField. When I tap on … Read more

Phone: numeric keyboard for text input

Is there a way to force the number keyboard to come up on the phone for an <input type=”text”>? I just realized that <input type=”number”> in HTML5 is for “floating-point numbers”, so it isn’t suitable for credit card numbers, ZIP codes, etc. I want to emulate the numeric-keyboard functionality of <input type=”number”>, for inputs that … Read more

Move textfield when keyboard appears swift

I’m using Swift for programing with iOS and I’m using this code to move the UITextField, but it does not work. I call the function keyboardWillShow correctly, but the textfield doesn’t move. I’m using autolayout. override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector(“keyboardWillShow:”), name:UIKeyboardWillShowNotification, object: nil); NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector(“keyboardWillHide:”), name:UIKeyboardWillHideNotification, object: nil); } deinit { … Read more

How do I detect if software keyboard is visible on Android Device or not?

Is there a way in Android to detect if the software (a.k.a. “soft”) keyboard is visible on screen? 34 Answers 34 This works for me. Maybe this is always the best way for all versions. It would be effective to make a property of keyboard visibility and observe this changes delayed because the onGlobalLayout method … Read more

Android: show soft keyboard automatically when focus is on an EditText

I’m showing an input box using AlertDialog. The EditText inside the dialog itself is automatically focused when I call AlertDialog.show(), but the soft keyboard is not automatically shown. How do I make the soft keyboard automatically show when the dialog is shown? (and there is no physical/hardware keyboard). Similar to how when I press the … Read more

How can I dismiss the on screen keyboard?

I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go away automatically? import ‘package:flutter/material.dart’; class MyHomePage extends StatefulWidget { MyHomePageState createState() => new MyHomePageState(); } class MyHomePageState extends State<MyHomePage> { TextEditingController … Read more

How to dismiss keyboard for UITextView with return key?

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. In IB’s library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return … Read more