iconbutton in flutter code example
Example 1: flutter textbutton.icon
TextButton.icon(
icon: Icon(Icons.camera),
label: Text('Take A Photo'),
onPressed: () {},
)
Example 2: flutter RaisedButton with icon
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: () {},
),
)
Example 3: icon as button flutter
IconButton(
icon: Icon(
Icons.directions_transit,
),
iconSize: 50,
color: Colors.green,
splashColor: Colors.purple,
onPressed: () {},
),
Example 4: onpressed icon flutter
final VoidCallback onPressed