Complete the code to create an IconButton with a home icon.
IconButton(icon: Icon(Icons.[1]), onPressed: () {})The Icons.home shows a home icon on the button.
Complete the code to add a tooltip to the IconButton.
IconButton(icon: Icon(Icons.add), tooltip: [1], onPressed: () {})The tooltip property shows a helpful text when the user long-presses or hovers over the button.
Fix the error in the IconButton code by completing the onPressed callback.
IconButton(icon: Icon(Icons.delete), onPressed: [1])The onPressed property requires a function. Using () => print('Deleted') defines a function that runs when pressed.
Fill both blanks to create an IconButton with a blue color and a print action.
IconButton(icon: Icon(Icons.send, color: [1]), onPressed: [2])
Use Colors.blue to color the icon blue and an anonymous function () => print('Sent') for the onPressed action.
Fill all three blanks to create an IconButton with a green icon, a tooltip, and a print action.
IconButton(icon: Icon(Icons.check, color: [1]), tooltip: [2], onPressed: [3])
The icon color is set to green, the tooltip says 'Confirm', and the onPressed runs a function printing 'Confirmed'.