Answers for "iconbutton on left flutter"

1

flutter RaisedButton with icon

// JZ
Container(
                  height: 25.0,
                  padding: EdgeInsets.only(left: 10.0),
                  child: RaisedButton.icon(
                    color: Colors.white,
                    label: Text(
                      'Te amo, pero no eres para mi',
                      style: TextStyle(fontSize: 13.0),
                    ),
                    icon: Icon(
                      Icons.ac_unit_outlined,
                      size: 13.0,
                    ),
                    onPressed: () {},
                  ),
                )
Posted by: Guest on February-18-2021
0

flutter change the icon of icon button on pressed

bool selected = true;

//...

Widget build(BuildContext context) {
	return Scaffold(
    	body: Center(
          child: IconButton(
              icon: Icon( selected ? Icons.celebration : Icons.title),
              onPressed: () {
                setState(() {
                  selected = !selected;
                });
              },
          ), //IconButton
   		), //Center
    ); //Scaffold
}
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language