Answers for "flutter how to add padding to a button"

5

how to add padding flutter

Padding(
	// Even Padding On All Sides
    padding: EdgeInsets.all(10.0),
    // Symetric Padding
    padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0),
    // Different Padding For All Sides
    padding: EdgeInsets.fromLTRB(1.0, 2.0, 3.0, 4.0);
    
    child: Child
    (
    	...
    ),
)
Posted by: Guest on May-25-2020
2

flutter elevated button padding inside

ElevatedButton(
  onPressed: () {
    // Validate will return true if the form is valid, or false if
    // the form is invalid.
    if(_formKey.currentState.validate()) {
    	// Process data.
    }
  },
  child: Padding(
  	padding: const EdgeInsets.symmetric(vertical: 15.0, horizontal: 10),
	child: Text('Entrar'),
  )
)
Posted by: Guest on March-16-2021

Code answers related to "flutter how to add padding to a button"

Browse Popular Code Answers by Language