animate method

Widget animate(
  1. HeroAnimation heroInfo
)

Implementation

Widget animate(HeroAnimation heroInfo) {
  final animation = heroInfo.animation;
  final direction = heroInfo.state;
  return hides
      ? SizeTransition(
          sizeFactor: sizeFactor(animation, direction.isCollapsed),
          child: child,
        )
      : AnimatedBuilder(
          builder: (BuildContext context, Widget? child) {
            return SizedBox(
              height: lerpDouble(
                collapsedHeight,
                expandedHeight,
                heroInfo.animation!.value,
              ),
              child: child,
            );
          },
          child: child,
          animation: heroInfo.animation!,
        );
}