How can I create widget when I pressed IconButton I tried something but it's not working.If you know and help me I will be happy.
Container(
color: Colors.redAccent,
height: commonHeight / 12,
width: commonWidth * 10 / 100,
child: IconButton(
highlightColor: Colors.yellow,
icon: Icon(Icons.add_sharp),
iconSize: 25,
onPressed: () {
print('Something');
},
),
),
],
),