AutoXL.deep constructor

const AutoXL.deep({
  1. Key? key,
  2. required List<Widget> layers,
  3. bool supportsPointer = true,
  4. bool supportsSensors = true,
  5. int depth = -1,
  6. Duration duration = const Duration(milliseconds: 200),
  7. Curve curve = Curves.ease,
  8. Duration drag = const Duration(milliseconds: 100),
})

AutoXL.deep is intended to translate and rotate greatly in its place to represent pointer hovers or accelerometer data.

This AutoXL defaults depth to -1, meaning each progressive layer will have a greater parallax factor than the previous.

Implementation

const AutoXL.deep({
  Key? key,
  required this.layers,
  this.supportsPointer = true,
  this.supportsSensors = true,
  this.depth = -1,
  this.duration = const Duration(milliseconds: 200),
  this.curve = Curves.ease,
  this.drag = const Duration(milliseconds: 100),
})  : _threeD = (!supportsPointer && !supportsSensors) ? 0 : 0.0015,
      _baseOffset = (!supportsPointer && !supportsSensors) ? 0 : 40.0,
      _layerOffset = (!supportsPointer && !supportsSensors) ? 0 : 30.0,
      _baseRotation = (!supportsPointer && !supportsSensors) ? 0 : 0.3,
      _layerRotation = (!supportsPointer && !supportsSensors) ? 0 : 0.2,
      _baseZ = (!supportsPointer && !supportsSensors) ? 0 : 0.15,
      _layerZ = (!supportsPointer && !supportsSensors) ? 0 : 0.025,
      super(key: key);