sizeFactor method

Animation<double> sizeFactor(
  1. Animation<double>? driver,
  2. bool isForward
)

Implementation

Animation<double> sizeFactor(Animation<double>? driver, bool isForward) {
  if (driver == null) {
    return kAlwaysCompleteAnimation;
  }
  return hides
      ? driver.drive(Tween(begin: 1, end: 0))
      : driver.drive(Tween(
          end: isForward
              ? (collapsedHeight / expandedHeight)
              : (expandedHeight / collapsedHeight),
          begin: 1,
        ));
}