buildCard method
Implementation
@override
Widget buildCard(BuildContext context, HeroAnimation heroInfo) {
final animation = heroInfo.animation;
final state = heroInfo.state;
if (animation == null) {
return state == ExpandingCardState.collapsed ? startText : endText;
} else {
final tween = TextStyleTween(begin: startStyle, end: endStyle);
return DefaultTextStyleTransition(
style: animation.drive(tween),
child: noStyle,
);
}
}