I'm trying to make an interface with Dart Flutter. I made an interface like this:
I want these items to be clickable. When clicked, I will take action. What can I do so that items can be clicked?
Codes:
body: Center(
child: GridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
),
itemCount: subjects.length,
itemBuilder: (BuildContext context, int index) {
return Container(
child: Card(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(subjects[index].subjectImage, fit: BoxFit.cover, height: 50, width: 50,),
SizedBox(height: 10,),
Text(subjects[index].subjectName, style: TextStyle(fontSize: 20),),
],
),
),
);
},
),
)
