I'm developing a Flutter app and I'm trying to find what this is called:
Essentially, it's a checklist that only allows one input and is two dimensional.
In this image, the top left box is selected.
I'd appreciate any help in trying to find what this element is called.
From what i know in flutter, i don't think flutter has that widget yet. So this is what i do to get around.
I create separate listTiles or boxes or any widget of choice. And in the onpressed/onclicked property, i compared the number assigned to that widget with my global variable and if it's true, set isSelected to true
Works everytime
int globalNum=3;
//somewhere in your widget tree
ListTile(
selected:globalNum==1?true:false,
selectedTileColor:Colors.red,
onTap:()=>globalNum=1,
),
ListTile(
selected:globalNum==2?true:false,
selectedTileColor:Colors.red,
onTap:()=>globalNum=2,
),
You can wrap your scaffold in a theme so that you don't set the individual selectedTileColor. But for demostration this is how you'll do it.