Answers for "input in flutter"

20

text field flutter

TextField(
              onChanged: (value) {
                //Do something with the user input.
              },
              decoration: InputDecoration(
                hintText: 'Enter your password.',
                contentPadding:
                    EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
                border: OutlineInputBorder(
                  borderRadius: BorderRadius.all(Radius.circular(32.0)),
                ),
                enabledBorder: OutlineInputBorder(
                  borderSide:
                      BorderSide(color: Colors.lightBlueAccent, width: 1.0),
                  borderRadius: BorderRadius.all(Radius.circular(32.0)),
                ),
                focusedBorder: OutlineInputBorder(
                  borderSide:
                      BorderSide(color: Colors.lightBlueAccent, width: 2.0),
                  borderRadius: BorderRadius.all(Radius.circular(32.0)),
                ),
              ),
            ),
Posted by: Guest on August-25-2020
2

how to take user input in a flutter app

For userinput, we have a widget called TextField(), An example is given below:
- The decoration field, is self explanatory.
- The labelText: tells user about what he/she has to provide in the respective TextField(). 
TextField(
	decoration: InputDecoration(labelText: 'Title'),
),
Posted by: Guest on October-19-2020

Browse Popular Code Answers by Language