How to change between two icons upon every time a button is pressed in flutter
Take for example we have an IconButton: IconButton( icon: Icon(Icons.add) onPressed: (){ //Every time this button is pressed the add icon changes to a tick icon, and when it is pressed again, the tick icon changes to an add icon…