ParallaxLayer constructor

const ParallaxLayer({
  1. Key? key,
  2. double xOffset = 0.0,
  3. double yOffset = 0.0,
  4. double xRotation = 0.0,
  5. double yRotation = 0.0,
  6. double zRotation = 0.0,
  7. bool enable3d = true,
  8. double dimensionalOffset = 0.001,
  9. Offset offset = const Offset(0, 0),
  10. Widget? child,
})

A Layer in an XL. These by themselves are not Widgets.

Each Layer serves as a blueprint for transformations to its child within a parent XL, containing all the animatable properties.

These Playerss react primarily to pointer data; that is, either mouse hovers or touch inputs.

Implementation

const ParallaxLayer({
  Key? key,
  double xOffset = 0.0,
  double yOffset = 0.0,
  double xRotation = 0.0,
  double yRotation = 0.0,
  double zRotation = 0.0,
  bool enable3d = true,
  double dimensionalOffset = 0.001,
  Offset offset = const Offset(0, 0),
  Widget? child,
}) : super(
        key: key,
        xOffset: xOffset,
        yOffset: yOffset,
        xRotation: xRotation,
        yRotation: yRotation,
        zRotation: zRotation,
        enable3d: enable3d,
        dimensionalOffset: dimensionalOffset,
        offset: offset,
        child: child ?? const SizedBox(),
      );