GitHub

    Table of contents

  1. Example
  2. Related Links

IconButton

Edit this page

A material design icon button.

Example

double _volume = 0.0;

// ...

Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          IconButton(
            icon: Icon(Icons.volume_up),
            tooltip: 'Increase volume by 10',
            onPressed: () {
              setState(() {
                _volume += 10;
              });
            },
          ),
          Text('Volume : $_volume')
        ],
      ),
    ),
  );
}

Related Links