Curtains.drawn constructor

const Curtains.drawn({
  1. Key? key,
  2. Axis? axis = Axis.vertical,
  3. Decoration? startCurtain,
  4. Decoration? endCurtain,
  5. double spread = 0.0,
  6. Sensitivity sensitivity = Sensitivity.none,
  7. bool isStartVisible = true,
  8. bool isEndVisible = true,
  9. AlignmentGeometry? alignment,
  10. TextDirection? textDirection,
  11. Clip clipBehavior = Clip.hardEdge,
  12. Widget? child,
  13. Duration? duration = _350ms,
  14. Curve? curve = Curves.easeOut,
})

These Curtains behave a little differently.
Instead of toggling visibility based on the scrollable child's extent, the startCurtain and endCurtain are static.

Toggling either isStartVisible or isEndVisible will still intrinsically animate over the given duration and curve.

Implementation

const Curtains.drawn({
  Key? key,
  Axis? axis = Axis.vertical,
  this.startCurtain,
  this.endCurtain,
  this.spread = 0.0,
  this.sensitivity = Sensitivity.none,
  bool isStartVisible = true,
  bool isEndVisible = true,
  this.alignment,
  this.textDirection,
  this.clipBehavior = Clip.hardEdge,
  Widget? child,
  this.duration = _350ms,
  this.curve = Curves.easeOut,
})  : _isDrawn = true,
      scrollDirection = axis ?? Axis.vertical,
      child = child ?? const SizedBox(key: Key('DRAWNđź“śCURTAIN')),
      startInitVisible = isStartVisible, // will be checked on-the-fly
      endInitVisible = isEndVisible, // will be checked on-the-fly
      elevation = null,
      color = null,
      super(key: key);