click icon onTap in flutter code example
Example: icon onpressed flutter
IconButton( icon: Icon(Icons.bluetooth), color: Colors.grey, highlightColor: Colors.red, hoverColor: Colors.green, focusColor: Colors.purple, splashColor: Colors.yellow, disabledColor: Colors.amber, iconSize: 48, onPressed: () { setState(() { _isBluetoothOn = !_isBluetoothOn; }); }, ),