mBuildTransform method

Widget mBuildTransform(
  1. Widget child
)

Implementation

Widget mBuildTransform(Widget child) {
  double width = (mConstraints?.maxWidth ?? 0) * mPullDownContentScale;
  double height = (mConstraints?.maxHeight ?? 0) * mPullDownContentScale;
  double dx = ((mConstraints?.maxWidth ?? 0) - width) * 0.5 * mScale;
  double dy = ((mConstraints?.maxHeight ?? 0) - height) * 0.5 * mScale;
  double x = mOffset.dx + mPullDownContentOffset.dx + dx;
  double y = mOffset.dy + mPullDownContentOffset.dy + dy;
  double scale = mScale * mPullDownContentScale;
  return Transform(
    transform: Matrix4.identity()
      ..translate(x, y)
      ..scale(scale, scale, 1.0),
    child: child,
  );
}