xxxxxxxxxx
Container(
// Define the dimensions, colors, and other properties of the container
width: 200,
height: 100,
color: Colors.blue,
// Add an InkWell widget to enable touch/click detection
child: InkWell(
// Define the function to be executed when the container is pressed
onTap: () {
print('Container pressed!');
// Add your desired actions here
},
// Add the content of the container (optional)
child: Center(
child: Text(
'Press Me',
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
),
),
)