commonProxyDecorator function

Widget commonProxyDecorator(
  1. Widget child,
  2. int index,
  3. Animation<double> animation
)

Implementation

Widget commonProxyDecorator(
  Widget child,
  int index,
  Animation<double> animation,
) {
  return AnimatedBuilder(
    animation: animation,
    builder: (_, Widget? child) {
      final double animValue = Curves.easeInOut.transform(animation.value);
      final double scale = lerpDouble(1, 1.02, animValue)!;
      // The lifted row leaves the page, and its text style, for the overlay.
      return ProxyDecoratorProvider(
        isProxyDecorator: true,
        lift: animValue,
        child: Surface.transparent(
          child: Transform.scale(scale: scale, child: child),
        ),
      );
    },
    child: child,
  );
}