iconButton function
Widget iconButton (String key, Widget icon, Function onTap)
This function is for debugging purposes. It prints "tapped" in the console for the developer to know that the button was tapped.
Implementation
Widget iconButton(String key, Widget icon, Function onTap) {
return Stack(
children: [
IconButton(
key: Key(key),
onPressed: () {
print('tapped');
onTap();
},
icon: icon,
),
],
);
}