buildCard method

  1. @override
Widget buildCard(
  1. BuildContext context,
  2. HeroAnimation heroInfo
)
override

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,
    );
  }
}