Please help me with this. I am new to flutter
The amber colored container/box is clickable/hyperlink. How do I make the white part to be also clickable?
Here is the code snippet :
Row(children: [
Expanded(
flex: 3,
child: InkWell(
onTap: onTap,
child: Container(
color: Colors.amber,
child: Padding(
padding: EdgeInsets.only(
top: 15,
bottom: 15,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
label ?? '',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: StyleKit.getWordStyle(
'b2bk',
color: labelColor,
),
),
],
),
),
),
),
);])
2
Answers
My solution is that I stack a container on top of the widget :
You can give fix height to the buttons in
Row
and wrap in an Clickable widget like below.By doing this your outer area will also get clickable.