Answers for "flutter buttonstyle padding"

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
0

flutter buttonstyle padding

Container(
    child: TextButton(
    style: ButtonStyle(
        backgroundColor:
            MaterialStateProperty.all<Color>(Colors.green),
        padding: MaterialStateProperty.all<EdgeInsets>(
            EdgeInsets.all(10)),
    ),
    child: Text(
        "Login",
        style: TextStyle(
        height: 1.0,
        fontSize: 30,
        color: Colors.white,
        ),
    ),
    onPressed: () => {print("login")},
    ),  
),
Posted by: Guest on March-19-2022

Browse Popular Code Answers by Language