0
Row(
children: lists
.map((element) => Expanded(
child: new GestureDetector(
onTap: () {
print("Container clicked");
setState(() {
_doop = element;
_isFavorited = true;
});
print(element);
},
child: Container(
margin: const EdgeInsets.all(5.0),
padding: const EdgeInsets.all(5.0),
decoration:
myBoxDecoration(), // <--- BoxDecoration here
child: Text(
element,
style: TextStyle(
fontSize: 15.0,
color: (_isFavorited ? Colors.black87 : Colors.yellowAccent),
fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
)))))
.toList())
You could reduce your problem to as little executable code as possible, so that people who would help you just copy, execute, correct, and explain the correction/landing. When you provide only half of the code can only happen two things, the first is to execute the code mentally trying to analyze and propose a change that 'might work'. The second is to have to waste an extra amount of time just to try to generate an executable code based on your code snippet, hunting for the name of variables and objects to be able to recreate it, it becomes difficult.
– Julio Henrique Bitencourt