tutorial_coach_mark
tutorial_coach_mark copied to clipboard
Can't use Animated List Item as target with Key
I am trying to target the first item of an AnimatedList like this:
final GlobalKey targetKey = GlobalKey();
return Container(
key : index == 0 ? targetKey : null,
onTapped: () {},
);
and add it as target :
TargetFocus(
identify: "Target 1",
shape: ShapeLightFocus.RRect,
radius: 15,
keyTarget: targetKey ,
contents: [
TargetContent(
align: ContentAlign.bottom,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Titulo lorem ipsum",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 20.0),
),
Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin pulvinar tortor eget maximus iaculis.",
style: TextStyle(color: Colors.white),
),
)
],
),
))
],
)